public __construct ( Kraken\Ipc\Socket\SocketListenerInterface $socket, Kraken\Network\NetworkComponentInterface $component = null ) | ||
$socket | Kraken\Ipc\Socket\SocketListenerInterface | |
$component | Kraken\Network\NetworkComponentInterface |
public function __construct(SocketListenerInterface $socket, NetworkComponentInterface $component = null)
{
$this->socket = $socket;
$this->component = $component === null ? new NullServer() : $component;
$socket->on('connect', [$this, 'handleConnect']);
}