Objects to connect real data to tubes.

See AlsoflowFountFromEndpoint
Function flowFountFromEndpoint Listen on the given endpoint, and thereby create a fount which outputs a new Flow for each connection.
Function flowFromEndpoint Convert a client endpoint into a Deferred that fires with a Flow.
Class _FountProducer A _FountProducer is an adapter to IPushProducer for an IFount.
Class _TransportDrain A _TransportDrain is an IDrain that wraps around an object that provides ITransport and IConsumer, and delivers data to that transport, and flow-control notifications from the consumer.
Class _TransportFount An IFount that wraps around an ITransport, and, with the help of a _ProtocolPlumbing, delivers any data received by that ITransport to an IDrain.
Class _ProtocolPlumbing An adapter between an ITransport and IFount / IDrain interfaces.
Function _factoryFromFlow Convert a flow function into an IProtocolFactory.
Class _FountImpl Implementation of fount for listening port.
def _factoryFromFlow(flow):

Convert a flow function into an IProtocolFactory.

A "flow function" is a function which takes a fount and an drain.

_factoryFromFlow takes such a function and creates an IProtocolFactory which, upon each new connection, provides the flow function with an IFount and an IDrain representing the read end and the write end of the incoming connection, respectively.

Parametersflowa 2-argument callable, taking (fount, drain). (type: callable)
Returnsa protocol factory. (type: IProtocolFactory)
def flowFountFromEndpoint(endpoint):

Listen on the given endpoint, and thereby create a fount which outputs a new Flow for each connection.

Parametersendpointa server endpoint. (type: IStreamServerEndpoint)
Returnsa twisted.internet.defer.Deferred that fires with a IFount whose outputType is Flow.
NoteIStreamServerEndpoint formally specifies that its connect method returns a Deferred that fires with an IListeningPort. However, IListeningPort is insufficient to express the requisite flow-control to implement a fount; so the endpoint parameter must be an extended endpoint whose listen Deferred fires with a provider of both IListeningPort and IPushProducer. Luckily, the real-world implementations of IListeningPort within Twisted are all IPushProducers as well, so practically speaking you will not notice this, but for testing it is important to know this is necessary.
def flowFromEndpoint(endpoint):

Convert a client endpoint into a Deferred that fires with a Flow.

Parametersendpointa client endpoint that will be connected to, once.
Returnsa Deferred that fires with a Flow.
API Documentation for tubes, generated by pydoctor at 2016-01-18 07:46:47.