Pigweed
C/C++ API Reference
|
Public Types | |
enum class | Event { kBytesAdded , kBytesRemoved , kLayerAdded , kLayerRemoved } |
Public Member Functions | |
void | Notify (Event event, size_t value) |
Notifies the observer that an event has occurred. | |
Base class for a subscriber that can be notified when a MultiBuf changes.
As an example, one possible usage is as part of a flow control scheme: An observer tracks how many bytes have been received and added to or removed and sent from one or more MultiBufs. It uses this information to update peers on how much more to send, and to update local tasks how much they may send.
|
strong |
A notification from a MultiBuf.
Each Event is paired with a value with an Event-specifc meaning.