twisted.internet.interfaces.IReactorTCP.connectTCP(host, port, factory, timeout=30, bindAddress=None) method documentationtwisted.internet.interfaces.IReactorTCP
View Source
Connect a TCP client.
| Parameters | host | A hostname or an IPv4 or IPv6 address literal. (type: bytes) |
| 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 which provides IConnector.
This connector will call various callbacks on the factory when a connection
is made, failed, or lost - see ClientFactory
docs for details. | |