t.i.i.ITCPTransport(ITransport) : interface documentation

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

Known subclasses: twisted.internet.interfaces.ISSLTransport, twisted.internet.interfaces.ITLSTransport

Known implementations: twisted.internet.iocpreactor.tcp.Connection, twisted.internet.tcp.Connection

A TCP based transport.
Method loseWriteConnection Half-close the write side of a TCP connection.
Method getTcpNoDelay Return if TCP_NODELAY is enabled.
Method setTcpNoDelay Enable/disable TCP_NODELAY.
Method getTcpKeepAlive Return if SO_KEEPALIVE is enabled.
Method setTcpKeepAlive Enable/disable SO_KEEPALIVE.
Method getHost Returns IPv4Address.
Method getPeer Returns IPv4Address.

Inherited from ITransport:

Method write Write some data to the physical connection, in sequence, in a non-blocking fashion.
Method writeSequence Write a list of strings to the physical connection.
Method loseConnection Close my connection, after writing all pending data.
def loseWriteConnection(): (source)

Half-close the write side of a TCP connection.

If the protocol instance this is attached to provides IHalfCloseableProtocol, it will get notified when the operation is done. When closing write connection, as with loseConnection this will only happen when buffer has emptied and there is no registered producer.
def getTcpNoDelay(): (source)
Return if TCP_NODELAY is enabled.
def setTcpNoDelay(enabled): (source)

Enable/disable TCP_NODELAY.

Enabling TCP_NODELAY turns off Nagle's algorithm. Small packets are sent sooner, possibly at the expense of overall throughput.
def getTcpKeepAlive(): (source)
Return if SO_KEEPALIVE is enabled.
def setTcpKeepAlive(enabled): (source)

Enable/disable SO_KEEPALIVE.

Enabling SO_KEEPALIVE sends packets periodically when the connection is otherwise idle, usually once every two hours. They are intended to allow detection of lost peers in a non-infinite amount of time.
def getHost(): (source)
Returns IPv4Address.
def getPeer(): (source)
Returns IPv4Address.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:17:34.