/** * Connects a new socket. * * @param SocketInterface $socket * @param callable $callback * @return ClientInterface */ public function connect(SocketInterface $socket, callable $callback) { $socket->connect($this, $callback); return $this; }
/** * @param SocketInterface $socket * @return $this|ServerInterface */ public function registerSocket(SocketInterface $socket) { $socket->bind($this); return $this; }