class documentation

class twisted.internet.iocpreactor.tcp.Port(_SocketCloser, _LogOwner): (source)

Implements interfaces: twisted.internet.interfaces.IListeningPort

View In Hierarchy

Undocumented

Instance Variable connected Undocumented
Instance Variable disconnected Undocumented
Instance Variable disconnecting Undocumented
Instance Variable sessionno Undocumented
Method __init__ Undocumented
Instance Variable port Undocumented
Instance Variable factory Undocumented
Instance Variable backlog Undocumented
Instance Variable interface Undocumented
Instance Variable reactor Undocumented
Instance Variable addressFamily Undocumented
Method __repr__ Undocumented
Method startListening Start listening on this port.
Instance Variable addrLen Undocumented
Instance Variable socket Undocumented
Instance Variable getFileHandle Undocumented
Method loseConnection Stop accepting connections on this port.
Instance Variable deferred Undocumented
Method connectionLost Cleans up the socket.
Method logPrefix Returns the name of my class, to prefix log entries with.
Method getHost Returns an IPv4Address or IPv6Address.
Method cbAccept Undocumented
Method handleAccept Undocumented
Method doAccept Undocumented
Instance Variable _realPortNumber Undocumented
Class Variable _type Undocumented
Instance Variable _addressType Undocumented
Method _logConnectionLostMsg Log message for closing port

Inherited from _SocketCloser:

Instance Variable _shouldShutdown Set to True if shutdown should be called before calling close on the underlying socket.
Method _closeSocket Undocumented

Inherited from _LogOwner:

Method _getLogPrefix Determine the log prefix to use for messages related to applicationObject, which may or may not be an interfaces.ILoggingContext provider.
connected = (source)

Undocumented

(type: bool)
disconnected = (source)

Undocumented

(type: bool)
disconnecting = (source)

Undocumented

(type: bool)
sessionno = (source)

Undocumented

_realPortNumber = (source)

Undocumented

_type = (source)

Undocumented

(type: str)
def __init__(self, port, factory, backlog=50, interface='', reactor=None): (source)

Undocumented

port = (source)

Undocumented

factory = (source)

Undocumented

backlog = (source)

Undocumented

interface = (source)

Undocumented

reactor = (source)

Undocumented

addressFamily = (source)

Undocumented

_addressType = (source)

Undocumented

def __repr__(self): (source)

Undocumented

ReturnsUndocumented (type: str)
def startListening(self): (source)

Start listening on this port.

RaisesCannotListenErrorIf it cannot listen on this port (e.g., it is a TCP port and it cannot bind to the required port number).
addrLen = (source)

Undocumented

socket = (source)

Undocumented

getFileHandle = (source)

Undocumented

def loseConnection(self, connDone=failure.Failure(main.CONNECTION_DONE)): (source)

Stop accepting connections on this port.

This will shut down my socket and call self.connectionLost(). It returns a deferred which will fire successfully when the port is actually closed.

deferred = (source)

Undocumented

def _logConnectionLostMsg(self): (source)

Log message for closing port

def connectionLost(self, reason): (source)

Cleans up the socket.

def logPrefix(self): (source)

Returns the name of my class, to prefix log entries with.

def getHost(self): (source)

Returns an IPv4Address or IPv6Address.

This indicates the server's address.

def cbAccept(self, rc, data, evt): (source)

Undocumented

def handleAccept(self, rc, evt): (source)

Undocumented

def doAccept(self): (source)

Undocumented

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.