|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Configuration for TCP socket backpressure control. More...
#include <common_defs.h>

Public Attributes | |
| std::size_t | max_pending_bytes {0} |
| Maximum bytes allowed in pending send buffer. | |
| std::size_t | high_water_mark {1024 * 1024} |
| High water mark - trigger backpressure callback. | |
| std::size_t | low_water_mark {256 * 1024} |
| Low water mark - resume sending. | |
Configuration for TCP socket backpressure control.
Backpressure prevents memory exhaustion when sending to slow receivers. When pending bytes exceed high_water_mark, the backpressure callback is invoked. When bytes drop below low_water_mark, sending can resume.
With max_pending_bytes=0, backpressure is disabled (unlimited buffering).
Definition at line 29 of file common_defs.h.
| std::size_t kcenon::network::internal::socket_config::high_water_mark {1024 * 1024} |
High water mark - trigger backpressure callback.
When pending bytes reach this threshold, the backpressure callback is invoked with true to signal the sender to slow down. Default: 1MB
Definition at line 47 of file common_defs.h.
| std::size_t kcenon::network::internal::socket_config::low_water_mark {256 * 1024} |
Low water mark - resume sending.
When pending bytes drop to this threshold after being above high_water_mark, the backpressure callback is invoked with false to signal that sending can resume. Default: 256KB
Definition at line 57 of file common_defs.h.
| std::size_t kcenon::network::internal::socket_config::max_pending_bytes {0} |
Maximum bytes allowed in pending send buffer.
When this limit is reached, try_send() returns false and new sends are rejected until buffer drains. Set to 0 for unlimited (default, backward compatible).
Definition at line 38 of file common_defs.h.