qb
2.0.0.0
C++17 Actor Framework
|
Event triggered when a connection is closed or lost. More...
#include <disconnected.h>
Public Attributes | |
int | reason = 0 |
Reason code for the disconnection. |
Event triggered when a connection is closed or lost.
This event is passed to the derived class's on() method when a disconnection occurs in an I/O object (e.g., a TCP session). The reason field can contain a code indicating the cause of disconnection.
Usage Example:
int qb::io::async::event::disconnected::reason = 0 |
Reason code for the disconnection.
Typically 0 for a normal shutdown initiated by disconnect() or peer closing gracefully. Non-zero values often correspond to system error codes (errno) if the disconnection was due to an error detected by the underlying transport or OS.