tubes.protocol._FountImpl(object) class documentationtubes.protocol
(View In Hierarchy)
Implements interfaces: tubes.itube.IFount
Implementation of fount for listening port.
| Method | __init__ | Create a fount implementation from a provider of IPushProducer
and a function that takes a fount and a drain. |
| Method | flowTo | Start flowing to the given drain. |
| Method | pauseFlow | Allow backpressure to build up in the listening socket; ask Twisted to
stop calling accept. |
| Method | stopFlow | Stop the delivery of Flow objects to this _FountImpl's drain,
and stop listening on the port represented by this fount. |
Create a fount implementation from a provider of IPushProducer
and a function that takes a fount and a drain.
| Parameters | portObject | the result of the Deferred
from IStreamServerEndpoint.listen (type: IListeningPort
and IPushProducer
provider (probably; workarounds are in place for other cases)) |
| aFlowFunction | a 2-argument callable, invoked when a connection arrives, with a fount and
drain. (type: callable) | |
| preListen | the founts and drains accepted before the listen Deferred
has fired. Because these might be arriving before this _FountImpl even
exists, this needs to be passed in. That is OK because _FountImpl is very
tightly coupled to flowFountFromEndpoint,
which is the only thing that constructs it. (type: list
of 2-tuples
of (fount, drain)) |
Start flowing to the given drain.
| Parameters | drain | The drain to send flows to. |
| Returns | the next fount in the chain. | |
Allow backpressure to build up in the listening socket; ask Twisted to
stop calling accept.
| Returns | An IPause. | |
Stop the delivery of Flow objects to this _FountImpl's drain,
and stop listening on the port represented by this fount.