src/Generics/Socket/ClientSocket.php
public function connect()
    {
        if (!is_resource($this->handle)) {
            throw new SocketException("Socket is not available");
        }
        if (! @socket_connect($this->handle, $this->endpoint->getAddress(), $this->endpoint->getPort())) {
            $code = socket_last_error($this->handle);
            throw new SocketException(socket_strerror($code), array(), $code);
        }
        $this->conntected = true;
    }
public function connect()
    {
        if (!is_resource($this->handle)) {
            throw new SocketException("Socket is not available");
        }
        if (! @socket_connect($this->handle, $this->endpoint->getAddress(), $this->endpoint->getPort())) {
            $code = socket_last_error($this->handle);
            throw new SocketException(socket_strerror($code), array(), $code);
        }
        $this->conntected = true;
    }
public function connect ( ) { if ( ! is_resource ( $ this -> handle ) ) { throw new SocketException ( "Socket is not available" ) ; } if ( ! @ socket_connect ( $ this -> handle , $ this -> endpoint -> getAddress ( ) , $ this -> endpoint -> getPort ( ) ) ) { $ code = socket_last_error ( $ this -> handle ) ; throw new SocketException ( socket_strerror ( $ code ) , array ( ) , $ code ) ; } $ this -> conntected = true ; }
Connect to remote endpoint

@throws SocketException
Connect to remote endpoint