qb
2.0.0.0
C++17 Actor Framework
|
Event triggered when unsent data remains in the output buffer after a write operation. More...
#include <pending_write.h>
Public Attributes | |
std::size_t | bytes |
Number of unsent bytes remaining in the write buffer after a partial write operation. |
Event triggered when unsent data remains in the output buffer after a write operation.
This event is passed to the derived class's on(qb::io::async::event::pending_write&&) method by some asynchronous output components (like qb::io::async::output or qb::io::async::io) if a write() operation to the underlying transport did not send all the data currently in the output buffer (e.g., because the socket's send buffer was full).
The bytes member indicates how much data is still pending. The I/O component will typically continue to listen for write readiness and attempt to send the remaining data. This event is useful for monitoring buffer utilization, implementing flow control (e.g., pausing data production if the buffer grows too large), or tracking the progress of large data transfers.
Usage Example: