An adapter between an ITransport and IFount / IDrain interfaces.

A _ProtocolPlumbing implements IProtocol to deliver all incoming data to the drain associated with its fount.

Method __init__ Undocumented
Method connectionMade The connection was established. Create an IDrain and an IFount and give them to the flow function.
Method dataReceived Some data was received. Deliver it to the fount created in connectionMade.
Method connectionLost The connection was lost.
Instance Variable _flow A flow function, as described in _factoryFromFlow. (type: callable)
Instance Variable _drain The drain that is passed on to the application, created after the connection is established in _ProtocolPlumbing.connectionMade. (type: _TransportDrain)
Instance Variable _fount The fount that is passed on to the application, created after the connection is established in _ProtocolPlumbing.connectionMade. (type: _TransportFount)

Inherited from BaseProtocol (via Protocol):

Method makeConnection Make a connection to a transport and a server.

Inherited from BaseProtocol (via Protocol):

Method makeConnection Make a connection to a transport and a server.
_flow =
A flow function, as described in _factoryFromFlow. (type: callable)
_drain =
The drain that is passed on to the application, created after the connection is established in _ProtocolPlumbing.connectionMade. (type: _TransportDrain)
_fount =
The fount that is passed on to the application, created after the connection is established in _ProtocolPlumbing.connectionMade. (type: _TransportFount)
def __init__(self, flow):
Undocumented
def connectionMade(self):

The connection was established. Create an IDrain and an IFount and give them to the flow function.

def dataReceived(self, data):

Some data was received. Deliver it to the fount created in connectionMade.

ParametersdataThe bytes that were received. (type: bytes)
def connectionLost(self, reason):

The connection was lost.

If our fount is flowing to a drain, alert that drain that the flow was stopped.

If our drain is flowing from a fount, alert that fount that it should stop flowing.

ParametersreasonThe reason that the connection was terminated. (type: Failure)
API Documentation for tubes, generated by pydoctor at 2016-01-18 07:46:47.