mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
add disconnect event and error codes
This commit is contained in:
parent
3cd8397085
commit
497b589558
1 changed files with 10 additions and 3 deletions
|
@ -43,6 +43,10 @@ enum { XWRELAY_NONE /* 0 is an illegal value */
|
||||||
XWRELAY_RECONNECT. Format: heartbeat_seconds: 2; connectionID:
|
XWRELAY_RECONNECT. Format: heartbeat_seconds: 2; connectionID:
|
||||||
2; */
|
2; */
|
||||||
|
|
||||||
|
, XWRELAY_DISCONNECT
|
||||||
|
/* Sent from relay when existing connection is terminated. Includes
|
||||||
|
reason code */
|
||||||
|
|
||||||
, XWRELAY_CONNECTDENIED
|
, XWRELAY_CONNECTDENIED
|
||||||
/* The relay says go away. Format: reason code: 1 */
|
/* The relay says go away. Format: reason code: 1 */
|
||||||
|
|
||||||
|
@ -71,11 +75,14 @@ typedef unsigned char XWRELAY_Cmd;
|
||||||
#define XWRELAY_PROTO_VERSION 0x01
|
#define XWRELAY_PROTO_VERSION 0x01
|
||||||
|
|
||||||
/* Errors passed with denied */
|
/* Errors passed with denied */
|
||||||
enum {
|
typedef enum {
|
||||||
XWRELAY_ERROR_NONE
|
XWRELAY_ERROR_NONE
|
||||||
,XWRELAY_ERROR_BADPROTO
|
,XWRELAY_ERROR_BADPROTO
|
||||||
,XWRELAY_ERROR_RELAYBUSY
|
,XWRELAY_ERROR_RELAYBUSY
|
||||||
,XWRELAY_ERROR_COOKIEINUSE
|
,XWRELAY_ERROR_SHUTDOWN /* relay's going down */
|
||||||
};
|
,XWRELAY_ERROR_TIMEOUT /* Other players didn't show */
|
||||||
|
,XWRELAY_ERROR_HEART /* Haven't heard from you in too long */
|
||||||
|
|
||||||
|
,XWRELAY_ERROR_LASTERR
|
||||||
|
} XWREASON;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue