Part of udplog.twisted View Source View In Hierarchy
Implements interfaces: udplog.twisted.internet.interfaces.IPushProducer
Push producer with a queue.
This producer accepts items with put
that will
be delivered to the passed callback if not paused. If the producer is
paused, the items get put in a queue. The queue may be limited in size,
which causes it to only queue the last n items. Upon resuming, items from
the queue will be passed to the callback again.
When the deferred returned by the callback fires, the delivery of the next item in the queue will be scheduled.
Line # | Kind | Name | Docs |
---|---|---|---|
253 | Method | __init__ | No summary |
279 | Method | pauseProducing | Called when the transport wants to pause receiving data. |
288 | Method | resumeProducing | Called when the transport is ready to resume receiving data. |
298 | Method | stopProducing | Called when the transport can no longer deliver data. |
308 | Method | put | Put a new item for delivery to the protocol using the callback. |
320 | Method | _processQueue | Process the next item in queue. |
Parameters | callback | Callback method that gets items passed to put whenever
the producer is not paused. The callback returns a deferred that is waited
upon before processing the next item. |
size | Optional queue size. If the queue becomes full, old items are dropped. | |
clock | An object which provides twisted.internet.interfaces.IReactorTime . |