src/network.h

changeset 176
ef8c39362342
parent 163
2a6d83f4677e
equal deleted inserted replaced
175:e0e061cf4829 176:ef8c39362342
37 extern "C" { 37 extern "C" {
38 #endif 38 #endif
39 39
40 #define NETCODE_ACCEPT 0x02 40 #define NETCODE_ACCEPT 0x02
41 #define NETCODE_DECLINE 0x04 41 #define NETCODE_DECLINE 0x04
42 #define NETCODE_DECLINE_MOVE 0x05
42 #define NETCODE_GAMEINFO 0x10 43 #define NETCODE_GAMEINFO 0x10
43 #define NETCODE_PGNDATA 0x11 44 #define NETCODE_PGNDATA 0x11
44 #define NETCODE_MOVE 0x20 45 #define NETCODE_MOVE 0x20
45 #define NETCODE_CHECK 0x22 46 #define NETCODE_CHECK 0x22
46 #define NETCODE_CHECKMATE 0x24 47 #define NETCODE_CHECKMATE 0x24
52 #define NETCODE_TIMEOVER 0x44 53 #define NETCODE_TIMEOVER 0x44
53 #define NETCODE_AGAIN 0x70 54 #define NETCODE_AGAIN 0x70
54 #define NETCODE_CONNLOST 0x80 55 #define NETCODE_CONNLOST 0x80
55 #define NETCODE_ERROR 0xFF 56 #define NETCODE_ERROR 0xFF
56 57
57 #define NETCODE_VERSION 21 58 #define NETCODE_VERSION 22
58 59
59 typedef struct { 60 typedef struct {
60 int fd; /* -1, if we are the client */ 61 int fd; /* -1, if we are the client */
61 struct sockaddr address; 62 struct sockaddr address;
62 socklen_t address_len; 63 socklen_t address_len;

mercurial