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.
def __init__(self, portObject, aFlowFunction, preListen):

Create a fount implementation from a provider of IPushProducer and a function that takes a fount and a drain.

ParametersportObjectthe result of the Deferred from IStreamServerEndpoint.listen (type: IListeningPort and IPushProducer provider (probably; workarounds are in place for other cases))
aFlowFunctiona 2-argument callable, invoked when a connection arrives, with a fount and drain. (type: callable)
preListenthe 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))
def flowTo(self, drain):

Start flowing to the given drain.

ParametersdrainThe drain to send flows to.
Returnsthe next fount in the chain.
def pauseFlow(self):

Allow backpressure to build up in the listening socket; ask Twisted to stop calling accept.

ReturnsAn IPause.
def stopFlow(self):

Stop the delivery of Flow objects to this _FountImpl's drain, and stop listening on the port represented by this fount.

API Documentation for tubes, generated by pydoctor at 2016-01-18 07:46:47.