src/proto2/NetworkConfig.hh
author nireco
Tue, 02 Dec 2008 00:23:16 +0000
changeset 174 073f25a84f60
parent 89 825c4613e087
permissions -rw-r--r--
removed bad comment
#ifndef NETWORK_CONFIG_HH
#define NETWORK_CONFIG_HH

// socket-related includes
// copied from clanlib code, so should be relatively OS-safe
#ifndef WIN32
        #include <sys/socket.h>
        #include <netinet/in.h>
        #include <arpa/inet.h>
        #include <netdb.h>
        #include <sys/time.h>
        #include <unistd.h> 
#else
        #include <winsock2.h>
        #include <windows.h>
        typedef int socklen_t;
#endif

#include <string>

const std::string NETWORK_PORT_STR = "9338";

const size_t NETWORK_PACKET_SIZE = 1280;
const int NETWORK_LISTEN_BACKLOG = 5;

const char NETWORK_MAGIC_STR[8+1] = "KISNGLIS";
const uint64_t NETWORK_MAGIC_ID = * ((const uint64_t *) NETWORK_MAGIC_STR);

#endif /* NETWORK_CONFIG_HH */