Interface BaseProtocol
Common interface for protocol interfaces.
Usually user implements protocols that derived from BaseProtocol
like
Protocol
or ProcessProtocol.
The only case when BaseProtocol
should be implemented directly is write-only
transport like write pipe
Methods
Name | Description |
---|---|
connectionLost
|
Called when the connection is lost or closed. |
connectionMade
|
connectionMade () and connectionLost () are
called exactly once per successful connection. All other callbacks will
be called between those two methods, which allows for easier resource
management in your protocol implementation.
|
pauseWriting
|
pauseWriting () and resumeWriting () calls are
paired – pauseWriting () is called once when the buffer goes
strictly over the high-water mark (even if subsequent writes increases
the buffer size even more), and eventually resumeWriting ()
is called once when the buffer size reaches the low-water mark.
|
resumeWriting
|
Called when the transport’s buffer drains below the low-water mark. |
Authors
Dragos Carp
Copyright
© 2015-2016 Dragos Carp
License
Boost Software License - Version 1.0