t.i.i.IReactorTCP(Interface) : interface documentation

Part of twisted.internet.interfaces View Source View In Hierarchy

Known implementations: twisted.internet.iocpreactor.reactor.IOCPReactor, twisted.internet.posixbase.PosixReactorBase

No interface docstring
Method listenTCP Connects a given protocol factory to the given numeric TCP/IP port.
Method connectTCP Connect a TCP client.
def listenTCP(port, factory, backlog=50, interface=''): (source)
Connects a given protocol factory to the given numeric TCP/IP port.
Parametersporta port number on which to listen
factorya twisted.internet.protocol.ServerFactory instance
backlogsize of the listen queue
interfacethe hostname to bind to, defaults to '' (all)
Returnsan object that provides IListeningPort.
RaisesCannotListenErroras defined here twisted.internet.error.CannotListenError, if it cannot listen on this port (e.g., it cannot bind to the required port number)
def connectTCP(host, port, factory, timeout=30, bindAddress=None): (source)
Connect a TCP client.
Parametershosta host name
porta port number
factorya twisted.internet.protocol.ClientFactory instance
timeoutnumber of seconds to wait before assuming the connection has failed.
bindAddressa (host, port) tuple of local address to bind to, or None.
ReturnsAn 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.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.