class documentation

Undocumented

Method __init__ Start talking to standard IO with the given protocol.
Method checkConnLost Undocumented
Method dataReceived Undocumented
Method getHost Similar to getPeer, but returns an address describing this side of the connection.
Method getPeer Get the remote address of this connection.
Method loseConnection Close my connection, after writing all pending data.
Method pauseProducing Pause producing data.
Method readConnectionLost Undocumented
Method registerProducer Register to receive data from a producer.
Method resumeProducing Resume producing data.
Method stopProducing Stop producing data.
Method unregisterProducer Stop consuming data from a producer, without disconnecting.
Method write Write some data to the physical connection, in sequence, in a non-blocking fashion.
Method writeConnectionLost Undocumented
Method writeSequence Write an iterable of byte strings to the physical connection.
Class Variable connsLost Undocumented
Instance Variable disconnected Undocumented
Instance Variable disconnecting Undocumented
Instance Variable proto Undocumented
Instance Variable stdin Undocumented
Instance Variable stdout Undocumented

Inherited from _PollingTimer:

Instance Variable reactor Undocumented
Method _addPollableResource Undocumented
Method _checkPollingState Undocumented
Method _pause Undocumented
Method _pollEvent Undocumented
Method _reschedule Undocumented
Method _startPolling Undocumented
Method _stopPolling Undocumented
Method _unpause Undocumented
Instance Variable _currentTimeout Undocumented
Instance Variable _paused Undocumented
Instance Variable _pollTimer Undocumented
Instance Variable _resources Undocumented
def __init__(self, proto, reactor=None): (source)

Start talking to standard IO with the given protocol.

Also, put it stdin/stdout/stderr into binary mode.

def checkConnLost(self): (source)

Undocumented

def dataReceived(self, data): (source)

Undocumented

def getHost(self): (source)

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

Returns
An IAddress provider.
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.

Returns
An IAddress provider.
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 pauseProducing(self): (source)

Pause producing data.

Tells a producer that it has produced too much data to process for the time being, and to stop until resumeProducing() is called.

def readConnectionLost(self): (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. The consumer will only call resumeProducing to balance a previous pauseProducing call; the producer is assumed to start in an un-paused state.

Parameters
producerUndocumented
streamingTrue if producer provides IPushProducer, False if producer provides IPullProducer.
Raises
RuntimeErrorIf a producer is already registered.
def resumeProducing(self): (source)

Resume producing data.

This tells a producer to re-add itself to the main loop and produce more data for its consumer.

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 unregisterProducer(self): (source)

Stop consuming data from a producer, without disconnecting.

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.

Parameters
dataThe data to write.
def writeConnectionLost(self): (source)

Undocumented

def writeSequence(self, seq): (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.

Parameters
seqUndocumented
dataThe data to write.
connsLost: int = (source)

Undocumented

disconnected: bool = (source)

Undocumented

disconnecting: bool = (source)

Undocumented

Undocumented

Undocumented

Undocumented