connectTCP(self,
host,
port,
factory,
timeout=30,
bindAddress=None)
Connect a TCP client.
-
- Parameters:
host -
a host name
port -
a port number
factory -
a twisted.internet.protocol.ClientFactory
instance
timeout -
number of seconds to wait before assuming the connection has
failed.
bindAddress -
a (host, port) tuple of local address to bind to, or None.
- Returns:
-
An object implementing
IConnector . This connector will
call various callbacks on the factory when a connection is made,
failed, or lost - see ClientFactory docs for details.
|