public function connect(callable $callback)
    {
        $this->connection->connect(function ($connection) use ($callback) {
            call_user_func($callback, $this, $connection);
        });
    }
public function connect(callable $callback)
    {
        $this->connection->connect(function ($connection) use ($callback) {
            call_user_func($callback, $this, $connection);
        });
    }
public function connect ( callable $ callback ) { $ this -> connection -> connect ( function ( $ connection ) use ( $ callback ) { call_user_func ( $ callback , $ this , $ connection ) ; } ) ; }
Opens the connection to the server.

@param callable $callback Callback for connection event.
Opens the connection to the server .