1 /* 2 * Copyright 2006 Serge van den Boom <svdb@stack.nl> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19 #if !defined(UQM_SUPERMELEE_NETPLAY_NETPLAY_H_) && defined(NETPLAY) 20 #define UQM_SUPERMELEE_NETPLAY_NETPLAY_H_ 21 22 // NETPLAY can either be unset (in which case we will never get here) 23 // NETPLAY_FULL, or NETPLAY_IPV4 (disables IPv6) 24 #define NETPLAY_IPV4 1 25 #define NETPLAY_FULL 2 26 27 #define NETPLAY_PROTOCOL_VERSION_MAJOR 0 28 #define NETPLAY_PROTOCOL_VERSION_MINOR 4 29 30 #define NETPLAY_MIN_UQM_VERSION_MAJOR 0 31 #define NETPLAY_MIN_UQM_VERSION_MINOR 6 32 #define NETPLAY_MIN_UQM_VERSION_PATCH 9 33 34 #undef NETPLAY_DEBUG 35 /* Extra debugging for netplay */ 36 #undef NETPLAY_DEBUG_FILE 37 /* Dump extra debugging information to file. 38 * Implies NETPLAY_DEBUG.*/ 39 #define NETPLAY_STATISTICS 40 /* Keep some statistics */ 41 #define NETPLAY_CHECKSUM 42 /* Send/process checksums to verify that both sides of a network 43 * connection are still in sync. 44 * If not enabled, incoming checksum packets will be ignored. 45 * TODO: make compilation of crc.c and checksum.c conditional. */ 46 #define NETPLAY_CHECKSUM_INTERVAL 1 47 /* If NETPLAY_CHECKSUM is defined, this define determines 48 * every how many frames a checksum packet is sent. */ 49 50 #define NETPLAY_READBUFSIZE 2048 51 #define NETPLAY_CONNECTTIMEOUT 2000 52 /* Time to wait for a connect() to succeed. In ms. */ 53 //#define NETPLAY_LISTENTIMEOUT 30000 54 // /* Time to wait for a listen() to succeed. In ms. */ 55 #define NETPLAY_RETRYDELAY 2000 56 /* Time to wait after all addresses of a host have been tried 57 * before starting retrying them all. In ms. */ 58 #define NETPLAY_LISTEN_BACKLOG 2 59 /* Second argument to listen(). */ 60 61 62 #ifdef _MSC_VER 63 # if _MSC_VER < 1300 64 /* NETPLAY_DEBUG_FILE requires the __VA_ARGS__ macro, which is 65 * not available on MSVC 6.0. */ 66 # undef NETPLAY_DEBUG_FILE 67 # endif 68 #endif 69 70 #ifdef NETPLAY_DEBUG_FILE 71 # define NETPLAY_DEBUG 72 # define DUMP_CRC_OPS 73 #endif 74 75 76 #endif /* UQM_SUPERMELEE_NETPLAY_NETPLAY_H_ */ 77 78