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