interface documentation

class twisted.internet.interfaces.ITLSTransport(ITCPTransport): (source)

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

View In Hierarchy

A TCP transport that supports switching to TLS midstream.

Once TLS mode is started the transport will implement ISSLTransport.

Method startTLS Initiate TLS negotiation.

Inherited from ITCPTransport:

Method loseWriteConnection Half-close the write side of a TCP connection.
Method abortConnection Close the connection abruptly.
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 or IPv6Address.
Method getPeer Returns IPv4Address or IPv6Address.

Inherited from ITransport (via ITCPTransport):

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

Initiate TLS negotiation.

ParameterscontextFactoryAn object which creates appropriately configured TLS connections.

For clients, use twisted.internet.ssl.optionsForClientTLS; for servers, use twisted.internet.ssl.CertificateOptions.

(type: IOpenSSLClientConnectionCreator or IOpenSSLServerConnectionCreator, depending on whether this ITLSTransport is a server or not. If the appropriate interface is not provided by the value given for contextFactory, it must be an implementor of IOpenSSLContextFactory.)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.