twisted.internet._win32stdio.StandardIO(_pollingfile._PollingTimer)
class documentationtwisted.internet._win32stdio
View Source
(View In Hierarchy)
Implements interfaces: twisted.internet.interfaces.IConsumer, twisted.internet.interfaces.IPushProducer, twisted.internet.interfaces.ITransport
Method | __init__ | Start talking to standard IO with the given protocol. |
Method | dataReceived | Undocumented |
Method | readConnectionLost | Undocumented |
Method | writeConnectionLost | Undocumented |
Method | checkConnLost | Undocumented |
Method | write | Write some data to the physical connection, in sequence, in a non-blocking fashion. |
Method | writeSequence | Write a list of 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 | 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 | Pause producing data. |
Method | resumeProducing | Resume producing data. |
Inherited from _PollingTimer:
Method | _addPollableResource | Undocumented |
Method | _checkPollingState | Undocumented |
Method | _startPolling | Undocumented |
Method | _stopPolling | Undocumented |
Method | _pause | Undocumented |
Method | _unpause | Undocumented |
Method | _reschedule | Undocumented |
Method | _pollEvent | Undocumented |
Start talking to standard IO with the given protocol.
Also, put it stdin/stdout/stderr into binary mode.
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.
Write a list of 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 string.
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.
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. |
Similar to getPeer, but returns an address describing this side of the connection.
Returns | An IAddress
provider. |
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.
Parameters | streaming | True if producer provides IPushProducer ,
False if producer provides IPullProducer . (type: bool ) |
Returns | None | |
Raises | RuntimeError | If a producer is already registered. |
Stop producing data.
This tells a producer that its consumer has died, so it must stop producing data for good.
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.
Resume producing data.
This tells a producer to re-add itself to the main loop and produce more data for its consumer.