src/LdapTools/Utilities/TcpSocket.php
public function connect($host, $port, $timeout = 1)
    {
        $this->socket = @stream_socket_client(
            "tcp://$host:$port",
            $errorNumber,
            $errorMessage,
            $timeout,
            STREAM_CLIENT_CONNECT,
            stream_context_create($this->options)
        );

        return (bool) $this->socket;
    }
public function connect($host, $port, $timeout = 1)
    {
        $this->socket = @stream_socket_client(
            "tcp://$host:$port",
            $errorNumber,
            $errorMessage,
            $timeout,
            STREAM_CLIENT_CONNECT,
            stream_context_create($this->options)
        );

        return (bool) $this->socket;
    }
public function connect ( $ host , $ port , $ timeout = 1 ) { $ this -> socket = @ stream_socket_client ( "tcp://$host:$port" , $ errorNumber , $ errorMessage , $ timeout , STREAM_CLIENT_CONNECT , stream_context_create ( $ this -> options ) ) ; return ( bool ) $ this -> socket ; }
Connect to the host on the port defined for this TCP socket.

@param string $host
@param int $port
@param int $timeout
@return bool
Connect to the host on the port defined for this TCP socket .