1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
17 #define DEFAULT_SERVER_PORT 19504
19 #define PROTOCOL_VERSION_1 1
20 #define PROTOCOL_VERSION_2 2
21 #define PROTOCOL_VERSION_3 0
23 #define OP_PROTOCOL_VERSION 1
24 #define OP_BAD_PROTOCOL_VERSION 2
25 #define OP_YOUR_NUMBER 3
26 #define OP_NUMBER_WANTED 4
27 #define OP_PLAYER_NAME 5
28 #define OP_PLAYER_CONNECTED 6
29 #define OP_PLAYER_DISCONNECTED 7
30 #define OP_START_PLAYING 8
31 #define OP_PAUSE_PLAYING 9
32 #define OP_CONTINUE_PLAYING 10
33 #define OP_STOP_PLAYING 11
34 #define OP_MOVE_PLAYER 12
35 #define OP_BROADCAST_MESSAGE 13
37 #define MAX_BUFFER_SIZE 4096
39 int NetworkServerThread(void *);
40 void NetworkServer(int, int);