Part of twisted.internet.interfaces View Source View In Hierarchy
Known implementations: twisted.internet.iocpreactor.reactor.IOCPReactor, twisted.internet.posixbase.PosixReactorBase
Method | listenTCP | Connects a given protocol factory to the given numeric TCP/IP port. |
Method | connectTCP | Connect a TCP client. |
Parameters | port | a port number on which to listen |
factory | a twisted.internet.protocol.ServerFactory
instance
| |
backlog | size of the listen queue | |
interface | the hostname to bind to, defaults to '' (all) | |
Returns | an object that provides IListeningPort .
| |
Raises | CannotListenError | as defined here twisted.internet.error.CannotListenError ,
if it cannot listen on this port (e.g., it cannot bind to the required port
number)
|
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 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.
|