--- a/src/Network/Config.hh Fri Jan 16 21:24:45 2009 +0200
+++ b/src/Network/Config.hh Fri Jan 16 22:03:49 2009 +0200
@@ -1,28 +1,24 @@
#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
+/**
+ * @file
+ *
+ * Network-related configuration
+ */
#include <string>
+/** Default port used for network games */
const std::string NETWORK_PORT_STR = "9338";
+/** Maximum packet size used for normal NetworkPackets... aligned to a sensible UDP mtu */
const size_t NETWORK_PACKET_SIZE = 1280;
+
+/** Backlog used for TCP server... doesn't really matter all that much */
const int NETWORK_LISTEN_BACKLOG = 5;
+/** Magic string used to identify game between client/server */
const char NETWORK_MAGIC_STR[8+1] = "KISNGLIS";
const uint64_t NETWORK_MAGIC_ID = * ((const uint64_t *) NETWORK_MAGIC_STR);