mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
update protocol description
This commit is contained in:
parent
55c117c9fc
commit
5f2d628855
1 changed files with 19 additions and 12 deletions
|
@ -33,41 +33,44 @@
|
||||||
typedef
|
typedef
|
||||||
#endif
|
#endif
|
||||||
enum { XWPDEV_NONE /* 0 is an illegal value */
|
enum { XWPDEV_NONE /* 0 is an illegal value */
|
||||||
|
/* All messages have the following six-byte header
|
||||||
|
* proto: 1 byte
|
||||||
|
* msgID: 4 byte unsigned long, 0 an illegal value
|
||||||
|
* cmd: 1 byte, one of the values below.
|
||||||
|
*/
|
||||||
|
|
||||||
,XWPDEV_ALERT /* relay->device: provides a string message to
|
,XWPDEV_ALERT /* relay->device: provides a string message to
|
||||||
present to the user (with device allowed not
|
present to the user (with device allowed not
|
||||||
to present the same string more than once)
|
to present the same string more than once)
|
||||||
format: proto: 1, this enum: 1,
|
format: header, null-terminnated string: varies */
|
||||||
null-terminnated string: varies */
|
|
||||||
,XWPDEV_REG /* dev->relay: device registers self and
|
,XWPDEV_REG /* dev->relay: device registers self and
|
||||||
self-selected (e.g. gcm) or assigned devid
|
self-selected (e.g. gcm) or assigned devid
|
||||||
format: proto: 1; this enum: 1; idType: 1,
|
format: header, idType: 1,
|
||||||
idLen: 2, id: <idLen> */
|
idLen: 2, id: <idLen> */
|
||||||
|
|
||||||
,XWPDEV_REGRSP /* relay->device: if non-relay-assigned devid
|
,XWPDEV_REGRSP /* relay->device: if non-relay-assigned devid
|
||||||
type was given, this gives the
|
type was given, this gives the
|
||||||
relay-assigned one to be used from now on.
|
relay-assigned one to be used from now on.
|
||||||
format: proto: 1, this enum: 1, idLen: 2, id: <idLen>
|
format: header, idLen: 2, id: <idLen>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
,XWPDEV_PING /* device->relay: keep the UDP connection
|
,XWPDEV_PING /* device->relay: keep the UDP connection
|
||||||
open. format: proto: 1, this enum: 1. */
|
open. header. */
|
||||||
|
|
||||||
,XWPDEV_HAVEMSGS /* Relay->device: check messages for this
|
,XWPDEV_HAVEMSGS /* Relay->device: check messages for this
|
||||||
game. format: proto: 1, this enum: 1; clientToken: 4 */
|
game. format: header */
|
||||||
|
|
||||||
,XWPDEV_RQSTMSGS /* device->relay: got any messages for me?
|
,XWPDEV_RQSTMSGS /* device->relay: got any messages for me?
|
||||||
format: proto: 1, this enum 1, devID: 4 [, clientToken: 4]
|
format: header, devID: 4 [, clientToken: 4]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
,XWPDEV_MSG /* dev->relay and relay->dev: norm: a message from a game to
|
,XWPDEV_MSG /* dev->relay and relay->dev: norm: a message from a game to
|
||||||
the relay format: proto: 1, this enum: 1,
|
the relay format: header, clientToken: 4, message<varies>*/
|
||||||
clientToken: 4, message<varies>*/
|
|
||||||
|
|
||||||
,XWPDEV_MSGNOCONN /* dev->relay in the proxy format that
|
,XWPDEV_MSGNOCONN /* dev->relay in the proxy format that
|
||||||
includes relayID (connname:hid) and seems
|
includes relayID (connname:hid) and seems
|
||||||
to be reserved for relay FWD messages.
|
to be reserved for relay FWD messages.
|
||||||
format: proto: 1, this enum: 1,
|
format: header, clientToken: 4; <cr>-terminated-connname:
|
||||||
clientToken: 4; <cr>-terminated-connname:
|
|
||||||
varies, message: varies */
|
varies, message: varies */
|
||||||
|
|
||||||
,XWPDEV_MSGRSP /* relay->dev: conveys error on receipt of XWPDEV_MSG */
|
,XWPDEV_MSGRSP /* relay->dev: conveys error on receipt of XWPDEV_MSG */
|
||||||
|
@ -75,7 +78,11 @@ enum { XWPDEV_NONE /* 0 is an illegal value */
|
||||||
,XWPDEV_BADREG /* relay->dev. You sent me a relayID via
|
,XWPDEV_BADREG /* relay->dev. You sent me a relayID via
|
||||||
XWPDEV_REG but I've never heard of it */
|
XWPDEV_REG but I've never heard of it */
|
||||||
|
|
||||||
,XWPDEV_ACK
|
,XWPDEV_ACK /* tells recipient its message has been
|
||||||
|
received. This is for debugging, and maybe
|
||||||
|
later for timing keepAlives based on
|
||||||
|
firewall timeouts. format: header, msgID: 4
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifndef CANT_DO_TYPEDEF
|
#ifndef CANT_DO_TYPEDEF
|
||||||
|
|
Loading…
Add table
Reference in a new issue