src/Buybrain/Nervus/Util/Tcp.php
public static function dial($addr)
    {
        $socket = stream_socket_client('tcp://' . $addr);
        if ($socket === false) {
            throw new Exception('Could not dial to ' . $addr . ': ' . socket_strerror(socket_last_error()));
        }
        return $socket;
    }
public static function dial($addr)
    {
        $socket = stream_socket_client('tcp://' . $addr);
        if ($socket === false) {
            throw new Exception('Could not dial to ' . $addr . ': ' . socket_strerror(socket_last_error()));
        }
        return $socket;
    }
public static function dial ( $ addr ) { $ socket = stream_socket_client ( 'tcp://' . $ addr ) ; if ( $ socket === false ) { throw new Exception ( 'Could not dial to ' . $ addr . ': ' . socket_strerror ( socket_last_error ( ) ) ) ; } return $ socket ; }
Connect to a TCP address and return a stream resource

@param $addr string
@return resource
Connect to a TCP address and return a stream resource