PHPDaemon\Network\Pool::connect PHP Method

connect() public method

Establish a connection with remote peer
public connect ( string $url, callback $cb, string $class = null ) : integer
$url string URL
$cb callback Callback
$class string Optional. Connection class name
return integer Connection's ID. Boolean false when failed
    public function connect($url, $cb, $class = null)
    {
        if ($class === null) {
            $class = $this->connectionClass;
        }
        $conn = new $class(null, $this);
        $conn->connect($url, $cb);
        return $conn;
    }