src/network.h

changeset 43
12141136a0da
parent 41
a8346dcf7bbf
child 44
1891d88cbd10
equal deleted inserted replaced
42:21cb830efe91 43:12141136a0da
35 35
36 #ifdef __cplusplus 36 #ifdef __cplusplus
37 extern "C" { 37 extern "C" {
38 #endif 38 #endif
39 39
40 #define NETCODE_ACCEPT 0x00 40 #define NETCODE_ACCEPT 0x02
41 #define NETCODE_DECLINE 0x01 41 #define NETCODE_DECLINE 0x04
42 #define NETCODE_GAMEINFO 0x10 42 #define NETCODE_GAMEINFO 0x10
43 #define NETCODE_MOVE 0x20 43 #define NETCODE_MOVE 0x20
44 #define NETCODE_SURRENDER 0x21 44 #define NETCODE_CHECK 0x22
45 #define NETCODE_REMIS 0x22
46 #define NETCODE_CHECK 0x23
47 #define NETCODE_CHECKMATE 0x24 45 #define NETCODE_CHECKMATE 0x24
48 #define NETCODE_STALEMATE 0x25 46 #define NETCODE_STALEMATE 0x28
49 #define NETCODE_TIMEOVER 0x26 47 #define NETCODE_SURRENDER 0x41
48 #define NETCODE_REMIS 0x42
49 #define NETCODE_TIMEOVER 0x44
50 50
51 #define NETCODE_VERSION 12 51 #define NETCODE_VERSION 13
52 52
53 typedef struct { 53 typedef struct {
54 int fd; /* -1, if we are the client */ 54 int fd; /* -1, if we are the client */
55 struct sockaddr address; 55 struct sockaddr address;
56 socklen_t address_len; 56 socklen_t address_len;

mercurial