src/proto2/NetworkConfig.hh
author terom
Sat, 08 Nov 2008 18:02:58 +0000
changeset 21 32c6cc55256a
parent 15 7710cce889b2
child 22 b70d30e1b0fe
permissions -rw-r--r--
change proto2 network code to use CL_NetSession
15
7710cce889b2 simplistic packets
terom
parents:
diff changeset
     1
#ifndef NETWORK_CONFIG_HH
7710cce889b2 simplistic packets
terom
parents:
diff changeset
     2
#define NETWORK_CONFIG_HH
7710cce889b2 simplistic packets
terom
parents:
diff changeset
     3
21
32c6cc55256a change proto2 network code to use CL_NetSession
terom
parents: 15
diff changeset
     4
// socket-related includes
32c6cc55256a change proto2 network code to use CL_NetSession
terom
parents: 15
diff changeset
     5
// copied from clanlib code, so should be relatively OS-safe
15
7710cce889b2 simplistic packets
terom
parents:
diff changeset
     6
#ifndef WIN32
7710cce889b2 simplistic packets
terom
parents:
diff changeset
     7
        #include <sys/socket.h>
7710cce889b2 simplistic packets
terom
parents:
diff changeset
     8
        #include <netinet/in.h>
7710cce889b2 simplistic packets
terom
parents:
diff changeset
     9
        #include <arpa/inet.h>
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    10
        #include <netdb.h>
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    11
        #include <sys/time.h>
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    12
        #include <unistd.h> 
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    13
#else
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    14
        #include <winsock2.h>
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    15
        #include <windows.h>
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    16
        typedef int socklen_t;
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    17
#endif
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    18
21
32c6cc55256a change proto2 network code to use CL_NetSession
terom
parents: 15
diff changeset
    19
#include <string>
32c6cc55256a change proto2 network code to use CL_NetSession
terom
parents: 15
diff changeset
    20
32c6cc55256a change proto2 network code to use CL_NetSession
terom
parents: 15
diff changeset
    21
const std::string NETWORK_APP_NAME = "KisnaGlista";
15
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    22
const std::string NETWORK_PORT_STR = "9338";
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    23
const uint16_t NETWORK_PACKET_MAX = 1280;
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    24
7710cce889b2 simplistic packets
terom
parents:
diff changeset
    25
#endif /* NETWORK_CONFIG_HH */