mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
add shutdown event and action
This commit is contained in:
parent
d29937a734
commit
befc90648e
2 changed files with 7 additions and 0 deletions
|
@ -82,6 +82,7 @@ StateTable g_stateTable[] = {
|
||||||
{ XWS_MISSING, XWE_DISCONNMSG, XWA_DISCONNECT, XWS_MISSING },
|
{ XWS_MISSING, XWE_DISCONNMSG, XWA_DISCONNECT, XWS_MISSING },
|
||||||
|
|
||||||
{ XWS_ANY, XWE_NOMORESOCKETS, XWA_NONE, XWS_DEAD },
|
{ XWS_ANY, XWE_NOMORESOCKETS, XWA_NONE, XWS_DEAD },
|
||||||
|
{ XWS_ANY, XWE_SHUTDOWN, XWA_SHUTDOWN, XWS_DEAD },
|
||||||
|
|
||||||
{ XWS_INITED, XWE_RECONNECTMSG, XWA_SEND_RERSP, XWS_CHK_ALLHERE_2 },
|
{ XWS_INITED, XWE_RECONNECTMSG, XWA_SEND_RERSP, XWS_CHK_ALLHERE_2 },
|
||||||
{ XWS_MISSING, XWE_RECONNECTMSG, XWA_SEND_RERSP, XWS_CHK_ALLHERE_2 },
|
{ XWS_MISSING, XWE_RECONNECTMSG, XWA_SEND_RERSP, XWS_CHK_ALLHERE_2 },
|
||||||
|
@ -190,6 +191,7 @@ eventString( XW_RELAY_EVENT evt )
|
||||||
CASESTR(XWE_SOMEMISSING);
|
CASESTR(XWE_SOMEMISSING);
|
||||||
CASESTR(XWE_OKTOSEND);
|
CASESTR(XWE_OKTOSEND);
|
||||||
CASESTR(XWE_COUNTSBAD);
|
CASESTR(XWE_COUNTSBAD);
|
||||||
|
CASESTR(XWE_SHUTDOWN);
|
||||||
}
|
}
|
||||||
assert(0);
|
assert(0);
|
||||||
return "";
|
return "";
|
||||||
|
@ -215,6 +217,7 @@ actString( XW_RELAY_ACTION act )
|
||||||
CASESTR(XWA_NOTIFYDISCON);
|
CASESTR(XWA_NOTIFYDISCON);
|
||||||
CASESTR(XWA_REMOVESOCKET);
|
CASESTR(XWA_REMOVESOCKET);
|
||||||
CASESTR(XWA_HEARTDISCONN);
|
CASESTR(XWA_HEARTDISCONN);
|
||||||
|
CASESTR(XWA_SHUTDOWN);
|
||||||
}
|
}
|
||||||
assert(0);
|
assert(0);
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -108,6 +108,8 @@ typedef enum {
|
||||||
|
|
||||||
,XWE_NOMORESOCKETS /* last socket's been removed */
|
,XWE_NOMORESOCKETS /* last socket's been removed */
|
||||||
|
|
||||||
|
,XWE_SHUTDOWN /* shutdown this game */
|
||||||
|
|
||||||
,XWE_ANY /* wildcard; matches all */
|
,XWE_ANY /* wildcard; matches all */
|
||||||
} XW_RELAY_EVENT;
|
} XW_RELAY_EVENT;
|
||||||
|
|
||||||
|
@ -143,6 +145,8 @@ typedef enum {
|
||||||
|
|
||||||
,XWA_HEARTDISCONN
|
,XWA_HEARTDISCONN
|
||||||
|
|
||||||
|
,XWA_SHUTDOWN
|
||||||
|
|
||||||
} XW_RELAY_ACTION;
|
} XW_RELAY_ACTION;
|
||||||
|
|
||||||
int getFromTable( XW_RELAY_STATE curState, XW_RELAY_EVENT curEvent,
|
int getFromTable( XW_RELAY_STATE curState, XW_RELAY_EVENT curEvent,
|
||||||
|
|
Loading…
Reference in a new issue