Implements interfaces: twisted.internet.interfaces.IConsumer, twisted.internet.interfaces.IHalfCloseableDescriptor, twisted.internet.interfaces.IProducer, twisted.internet.interfaces.ITransport

No class docstring
Method __init__ Undocumented
Method loseWriteConnection Undocumented
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.
Method getPeer Get the remote address of this connection.
Method getHost Similar to getPeer, but returns an address describing this side of the connection.
Method childDataReceived Undocumented
Method childConnectionLost Undocumented
Method connectionLost Undocumented
Method registerProducer Register to receive data from a producer.
Method unregisterProducer Stop consuming data from a producer, without disconnecting.
Method stopProducing Stop producing data.
Method pauseProducing Undocumented
Method resumeProducing Undocumented
Method stopReading Compatibility only, don't use. Call pauseProducing.
Method startReading Compatibility only, don't use. Call resumeProducing.
Method _writeConnectionLost Undocumented
Method _readConnectionLost Undocumented
def __init__(self, proto, stdin=0, stdout=1, reactor=None): (source)
Undocumented
def loseWriteConnection(self): (source)
Undocumented
def write(self, data): (source)

Write some data to the physical connection, in sequence, in a non-blocking fashion.

If possible, make sure that it is all written. No data will ever be lost, although (obviously) the connection may be closed before it all gets through.

ParametersdataThe data to write. (type: bytes)
def writeSequence(self, data): (source)

Write an iterable of byte strings to the physical connection.

If possible, make sure that all of the data is written to the socket at once, without first copying it all into a single byte string.

ParametersdataThe data to write. (type: an iterable of bytes)
def loseConnection(self): (source)

Close my connection, after writing all pending data.

Note that if there is a registered producer on a transport it will not be closed until the producer has been unregistered.

def getPeer(self): (source)

Get the remote address of this connection.

Treat this method with caution. It is the unfortunate result of the CGI and Jabber standards, but should not be considered reliable for the usual host of reasons; port forwarding, proxying, firewalls, IP masquerading, etc.

ReturnsAn IAddress provider.
def getHost(self): (source)

Similar to getPeer, but returns an address describing this side of the connection.

ReturnsAn IAddress provider.
def childDataReceived(self, fd, data): (source)
Undocumented
def childConnectionLost(self, fd, reason): (source)
Undocumented
def connectionLost(self, reason): (source)
Undocumented
def _writeConnectionLost(self, reason): (source)
Undocumented
def _readConnectionLost(self, reason): (source)
Undocumented
def registerProducer(self, producer, streaming): (source)

Register to receive data from a producer.

This sets self to be a consumer for a producer. When this object runs out of data (as when a send(2) call on a socket succeeds in moving the last data from a userspace buffer into a kernelspace buffer), it will ask the producer to resumeProducing().

For IPullProducer providers, resumeProducing will be called once each time data is required.

For IPushProducer providers, pauseProducing will be called whenever the write buffer fills up and resumeProducing will only be called when it empties.

ParametersstreamingTrue if producer provides IPushProducer, False if producer provides IPullProducer. (type: bool)
ReturnsNone
RaisesRuntimeErrorIf a producer is already registered.
def unregisterProducer(self): (source)

Stop consuming data from a producer, without disconnecting.

def stopProducing(self): (source)

Stop producing data.

This tells a producer that its consumer has died, so it must stop producing data for good.

def pauseProducing(self): (source)
Undocumented
def resumeProducing(self): (source)
Undocumented
def stopReading(self): (source)

Compatibility only, don't use. Call pauseProducing.

def startReading(self): (source)

Compatibility only, don't use. Call resumeProducing.

API Documentation for Twisted, generated by pydoctor at 2018-10-15 19:29:43.