mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +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
|
||||
#endif
|
||||
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
|
||||
present to the user (with device allowed not
|
||||
to present the same string more than once)
|
||||
format: proto: 1, this enum: 1,
|
||||
null-terminnated string: varies */
|
||||
format: header, null-terminnated string: varies */
|
||||
,XWPDEV_REG /* dev->relay: device registers self and
|
||||
self-selected (e.g. gcm) or assigned devid
|
||||
format: proto: 1; this enum: 1; idType: 1,
|
||||
format: header, idType: 1,
|
||||
idLen: 2, id: <idLen> */
|
||||
|
||||
,XWPDEV_REGRSP /* relay->device: if non-relay-assigned devid
|
||||
type was given, this gives the
|
||||
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
|
||||
open. format: proto: 1, this enum: 1. */
|
||||
open. header. */
|
||||
|
||||
,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?
|
||||
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
|
||||
the relay format: proto: 1, this enum: 1,
|
||||
clientToken: 4, message<varies>*/
|
||||
the relay format: header, clientToken: 4, message<varies>*/
|
||||
|
||||
,XWPDEV_MSGNOCONN /* dev->relay in the proxy format that
|
||||
includes relayID (connname:hid) and seems
|
||||
to be reserved for relay FWD messages.
|
||||
format: proto: 1, this enum: 1,
|
||||
clientToken: 4; <cr>-terminated-connname:
|
||||
format: header, clientToken: 4; <cr>-terminated-connname:
|
||||
varies, message: varies */
|
||||
|
||||
,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_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
|
||||
|
|
Loading…
Reference in a new issue