Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: b919374ef5ad27c013e2aa6bf3ba760ed5df39cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
   core/net.h
   This file is part of the Osirion project and is distributed under
   the terms of the GNU General Public License version 2
*/

#ifndef __INCLUDED_CORE_NET_H__
#define __INCLUDED_CORE_NET_H__

namespace core
{

/// network protocol version
const unsigned int PROTOCOLVERSION = 28;

/// maximum lenght of a (compressed) network message block
const unsigned int FRAMESIZE = 1152;
const unsigned int BLOCKSIZE = 8192;

/// maximum number of pending client connections, hard limit
const unsigned int MAXPENDINGCONNECTIONS = 32;

/// default network port
const unsigned int DEFAULTPORT = 8042;

/// network timeout in seconds
const float NETTIMEOUT = 15;

}

#include <unistd.h>
#include <errno.h>

#ifndef _WIN32

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>

#include <netinet/in.h>
#include <arpa/inet.h>

#include <sys/select.h>

#else

#include <winsock2.h>
#include <windows.h>

#endif

#endif // __INCLUDED_CORE_NET_H__