* @param $code Error code
* @return void
*/
- public function __construct (ProtocolHandler $protocolInstance, $code) {
+ public function __construct (HandleableProtocol $protocolInstance, $code) {
// Construct the message
$message = sprintf('[%s:] Requested socket is not yet registered.',
$protocolInstance->__toString()
* @param $socketResource A valid socket resource
* @return $isRegistered Whether the given socket resource is registered
*/
- function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource);
+ function isSocketRegistered (HandleableProtocol $protocolInstance, $socketResource);
/**
* Registeres given socket for listener or throws an exception if it is already registered
* @return void
* @throws SocketAlreadyRegisteredException If the given socket is already registered
*/
- function registerSocket (ProtocolHandler $protocolInstance, $socketResource);
+ function registerSocket (HandleableProtocol $protocolInstance, $socketResource);
/**
* Getter for given listener's socket resource
* @return $socketResource A valid socket resource
* @throws NoSocketRegisteredException If the requested socket is not registered
*/
- function getRegisteredSocketResource (ProtocolHandler $protocolInstance);
+ function getRegisteredSocketResource (HandleableProtocol $protocolInstance);
/**
* "Getter" for protocol/connection instance from given package data
* @param $protocolInstance An instance of an HandleableProtocol
* @return void
*/
- public final function setProtocolInstance (ProtocolHandler $protocolInstance = NULL) {
+ public final function setProtocolInstance (HandleableProtocol $protocolInstance = NULL) {
$this->protocolInstance = $protocolInstance;
}
* @param $socketResource A valid socket resource (optional)
* @return $clientInstance An instance of the requested client
*/
- public static final function createClientByProtocolInstance (ProtocolHandler $protocolInstance, $socketResource = FALSE) {
+ public static final function createClientByProtocolInstance (HandleableProtocol $protocolInstance, $socketResource = FALSE) {
// Default is NULL (to initialize variable)
$clientInstance = NULL;