Esempio n. 1
0
 /**
  * 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;
 }
Esempio n. 2
0
 /**
  * @param SocketInterface $socket
  * @return $this|ServerInterface
  */
 public function registerSocket(SocketInterface $socket)
 {
     $socket->bind($this);
     return $this;
 }