class documentation

Undocumented

Method abortConnection Close the connection abruptly.
Method getPeerCertificate Return an object with the peer's certificate info.
Method getTcpKeepAlive Return if SO_KEEPALIVE is enabled.
Method getTcpNoDelay Return if TCP_NODELAY is enabled.
Method loseWriteConnection Half-close the write side of a TCP connection.
Method setTcpKeepAlive Enable/disable SO_KEEPALIVE.
Method setTcpNoDelay Enable/disable TCP_NODELAY.

Inherited from TCP:

Method __init__ Undocumented
Method getHost Undocumented
Method getPeer Undocumented
Method loseConnection Undocumented
Method registerProducer Undocumented
Method unregisterProducer Undocumented
Method write Undocumented
Method writeSequence Undocumented
Class Variable port Undocumented
Instance Variable disconnected Undocumented
Instance Variable producers Undocumented
Instance Variable written Undocumented
Instance Variable _peer Undocumented
def abortConnection(self): (source)

Close the connection abruptly.

Discards any buffered data, stops any registered producer, and, if possible, notifies the other end of the unclean closure.

Present Since
11.1
def getPeerCertificate(self): (source)

Return an object with the peer's certificate info.

def getTcpKeepAlive(self): (source)

Return if SO_KEEPALIVE is enabled.

def getTcpNoDelay(self): (source)

Return if TCP_NODELAY is enabled.

def loseWriteConnection(self): (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 setTcpKeepAlive(self, 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 setTcpNoDelay(self, 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.