author | terom |
Thu, 20 Nov 2008 23:51:46 +0000 | |
changeset 89 | 825c4613e087 |
parent 22 | b70d30e1b0fe |
permissions | -rw-r--r-- |
15 | 1 |
#ifndef NETWORK_CONFIG_HH |
2 |
#define NETWORK_CONFIG_HH |
|
3 |
||
21 | 4 |
// socket-related includes |
5 |
// copied from clanlib code, so should be relatively OS-safe |
|
15 | 6 |
#ifndef WIN32 |
7 |
#include <sys/socket.h> |
|
8 |
#include <netinet/in.h> |
|
9 |
#include <arpa/inet.h> |
|
10 |
#include <netdb.h> |
|
11 |
#include <sys/time.h> |
|
12 |
#include <unistd.h> |
|
13 |
#else |
|
14 |
#include <winsock2.h> |
|
15 |
#include <windows.h> |
|
16 |
typedef int socklen_t; |
|
17 |
#endif |
|
18 |
||
21 | 19 |
#include <string> |
20 |
||
15 | 21 |
const std::string NETWORK_PORT_STR = "9338"; |
22
b70d30e1b0fe
all the network code is now there, although it doesn't quite work
terom
parents:
21
diff
changeset
|
22 |
|
89 | 23 |
const size_t NETWORK_PACKET_SIZE = 1280; |
24 |
const int NETWORK_LISTEN_BACKLOG = 5; |
|
25 |
||
26 |
const char NETWORK_MAGIC_STR[8+1] = "KISNGLIS"; |
|
27 |
const uint64_t NETWORK_MAGIC_ID = * ((const uint64_t *) NETWORK_MAGIC_STR); |
|
15 | 28 |
|
29 |
#endif /* NETWORK_CONFIG_HH */ |