man YEventDisconnect (Fonctions bibliothèques) - Y disconnect event structures
NAME
YEventDisconnect - Y disconnect event structures
STRUCTURES
typedef struct {
int reason;
} YEventDisconnect;
When you recieve this event it means that the Y server has disconnected the Y client application. This can be due to a variety of reasons, the reason code member determines this. Typical values are 0 for normal disconnect and non-zero for error. Each Y server may report different error (non-zero) reason codes in accordance with its own standards.
When you recieve this event, you should call YCloseConnection immediatly afterwards.