tubes.protocol._ProtocolPlumbing(_Protocol)
class documentationtubes.protocol
(View In Hierarchy)
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. |
_ProtocolPlumbing.connectionMade
. (type: _TransportDrain
)
_ProtocolPlumbing.connectionMade
. (type: _TransportFount
)
Some data was received. Deliver it to the fount created in connectionMade
.
Parameters | data | The bytes that were received. (type: bytes ) |
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.
Parameters | reason | The reason that the connection was terminated. (type: Failure ) |