Package twisted :: Package internet :: Module interfaces :: Class ITCPTransport

[frames | no frames]

## Class ITCPTransport

    Interface --+
                |
       ITransport --+
                    |
                   ITCPTransport

Known Subclasses:
  `ISSLTransport`, `ITLSTransport`

A TCP based transport.

Method Summary
| ``getHost`(self)` Returns IPv4Address.
| ``getPeer`(self)` Returns IPv4Address.
| ``getTcpKeepAlive`(self)` Return if SO_KEEPALIVE enabled.
| ``getTcpNoDelay`(self)` Return if TCP_NODELAY is enabled.
| ``setTcpKeepAlive`(self, enabled)` Enable/disable SO_KEEPALIVE.
| ``setTcpNoDelay`(self, enabled)` Enable/disable TCP_NODELAY.
Inherited from ITransport
| ``loseConnection`(self)` Close my connection, after writing all pending data.
| ``write`(self, data)` Write some data to the physical connection, in sequence.
| ``writeSequence`(self, data)` Write a list of strings to the physical connection.

Method Details

### getHost(self)

Returns IPv4Address.

  Overrides:
    `twisted.internet.interfaces.ITransport.getHost`

### getPeer(self)

Returns IPv4Address.

  Overrides:
    `twisted.internet.interfaces.ITransport.getPeer`

### getTcpKeepAlive(self)

Return if SO_KEEPALIVE enabled.

### getTcpNoDelay(self)

Return if TCP_NODELAY is enabled.

### setTcpKeepAlive(self, enabled)

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.

### setTcpNoDelay(self, enabled)

Enable/disable TCP_NODELAY.

Enabling TCP_NODELAY turns off Nagle's algorithm. Small packets are sent sooner, possibly at the expense of overall throughput.

Generated by Epydoc 2.0 on Sat May 15 20:08:48 2004 | http://epydoc.sf.net