public function connect($server = 'localhost', $port = 9998)
    {
        $addr = "tcp://$server:$port";
        $this->socket = stream_socket_client($addr, $errc, $errs, STREAM_CLIENT_CONNECT);
        if (!$this->socket) {
            throw new IOException("Connection to $server:$port failed");
        }
    }
public function connect($server = 'localhost', $port = 9998)
    {
        $addr = "tcp://$server:$port";
        $this->socket = stream_socket_client($addr, $errc, $errs, STREAM_CLIENT_CONNECT);
        if (!$this->socket) {
            throw new IOException("Connection to $server:$port failed");
        }
    }
public function connect ( $ server = 'localhost' , $ port = 9998 ) { $ addr = "tcp://$server:$port" ; $ this -> socket = stream_socket_client ( $ addr , $ errc , $ errs , STREAM_CLIENT_CONNECT ) ; if ( ! $ this -> socket ) { throw new IOException ( "Connection to $server:$port failed" ) ; } }
Connect to Handler Socket

@param string  $server
@param integer $port

@throws IOException
Connect to Handler Socket