Пример #1
0
def connect(host,
            port,
            service=VoidService,
            config={},
            ipv6=False,
            keepalive=False,
            timeout=3):
    s = SocketStream.connect(host,
                             port,
                             ipv6=ipv6,
                             keepalive=keepalive,
                             timeout=timeout)
    return connect_stream(s, service, config)
Пример #2
0
def connect(host, port, service=VoidService, config={}, ipv6=False, keepalive=False):
    """
    creates a socket-connection to the given host and port

    :param host: the hostname to connect to
    :param port: the TCP port to use
    :param service: the local service to expose (defaults to Void)
    :param config: configuration dict
    :param ipv6: whether to use IPv6 or not

    :returns: an RPyC connection
    """
    s = SocketStream.connect(host, port, ipv6=ipv6, keepalive=keepalive)
    return connect_stream(s, service, config)
Пример #3
0
def connect(host, port, service=VoidService, config={}, ipv6=False, keepalive=False):
    """
    creates a socket-connection to the given host and port

    :param host: the hostname to connect to
    :param port: the TCP port to use
    :param service: the local service to expose (defaults to Void)
    :param config: configuration dict
    :param ipv6: whether to create an IPv6 socket (defaults to ``False``)
    :param keepalive: whether to set TCP keepalive on the socket (defaults to ``False``)

    :returns: an RPyC connection
    """
    s = SocketStream.connect(host, port, ipv6=ipv6, keepalive=keepalive)
    return connect_stream(s, service, config)