*Change* MaxMsgSize is now 16K
*Change* MAX_BYTESPERSEC is now 14K (was hitting limit in 4p games old limit was 6K) *Change* relax timings of ping & scoreboard to alleviate the bandwidth strain a bit (r8381) git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8520 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
d6e70a3c00
commit
06e0716a14
|
@ -105,15 +105,14 @@ unsigned int masterserver_port = 0, gameserver_port = 0;
|
|||
#define NET_TIMEOUT_DELAY 2500 // we wait this amount of time for socket activity
|
||||
#define NET_READ_TIMEOUT 0
|
||||
/*
|
||||
*
|
||||
* === Using new socket code, this might not hold true any longer ===
|
||||
* NOTE /rant: If the buffer size isn't big enough, it will invalidate the socket.
|
||||
* Which means that we need to allocate a buffer big enough to handle worst case
|
||||
* situations.
|
||||
* reference: MaxMsgSize in netplay.h (currently set to 16K)
|
||||
*
|
||||
* reference: MaxMsgSize in netplay.h (currently set to 8192)
|
||||
*
|
||||
*/
|
||||
#define NET_BUFFER_SIZE (MaxMsgSize) // Would be 8K
|
||||
#define NET_BUFFER_SIZE (MaxMsgSize) // Would be 16K
|
||||
|
||||
// HACK(s) to allow us to call a src/multi*.c function
|
||||
extern void recvMultiStats(void); // from src/multistat.c
|
||||
|
|
|
@ -118,7 +118,7 @@ typedef enum
|
|||
|
||||
// Constants
|
||||
// @NOTE / FIXME: We need a way to detect what should happen if the msg buffer exceeds this.
|
||||
#define MaxMsgSize 8192 // max size of a message in bytes.
|
||||
#define MaxMsgSize 16384 // max size of a message in bytes.
|
||||
#define StringSize 64 // size of strings used.
|
||||
#define MaxGames 12 // max number of concurrently playable games to allow.
|
||||
#define extra_string_size 239 // extra 255 char for future use
|
||||
|
|
|
@ -78,13 +78,13 @@ extern UBYTE bDisplayMultiJoiningStatus; // draw load progress?
|
|||
// ////////////////////////////////////////////////////////////////////////////
|
||||
// defines
|
||||
|
||||
// NOTE: MaxMsgSize is currently set to 8K. When MAX_BYTESPERSEC has been reached (sent + recv!), then we do NOT
|
||||
// NOTE: MaxMsgSize is currently set to 16K. When MAX_BYTESPERSEC has been reached (sent + recv!), then we do NOT
|
||||
// do the sync code checks anymore(!), needless to say, this can and does cause issues.
|
||||
// FIXME: We should define this externally so people with dial-up modems can configure this
|
||||
// FIXME: Use possible compression on the packets.
|
||||
// NOTE: Remember, we (now) allow 150 units max * 7 (1 human, 6 AI possible for Host) to send to the other player.
|
||||
|
||||
#define MAX_BYTESPERSEC 6144 // bump up to 6K
|
||||
#define MAX_BYTESPERSEC 14336
|
||||
|
||||
#define ANYPLAYER 99
|
||||
#define ONEPLAYER 98
|
||||
|
|
|
@ -87,12 +87,12 @@ static UDWORD averagePing(void);
|
|||
// Defined numeric values
|
||||
// NOTE / FIXME: Current MP games are locked at 45ms
|
||||
#define MP_FPS_LOCK 45
|
||||
#define AV_PING_FREQUENCY MP_FPS_LOCK * 4 // how often to update average pingtimes. in approx millisecs.
|
||||
#define PING_FREQUENCY MP_FPS_LOCK * 4 // how often to update pingtimes. in approx millisecs.
|
||||
#define AV_PING_FREQUENCY MP_FPS_LOCK * 10 // how often to update average pingtimes. in approx millisecs.
|
||||
#define PING_FREQUENCY MP_FPS_LOCK * 6 // how often to update pingtimes. in approx millisecs.
|
||||
#define STRUCT_FREQUENCY MP_FPS_LOCK * 3 // how often (ms) to send a structure check.
|
||||
#define DROID_FREQUENCY MP_FPS_LOCK * 3 // how ofter (ms) to send droid checks
|
||||
#define POWER_FREQUENCY MP_FPS_LOCK * 3 // how often to send power levels
|
||||
#define SCORE_FREQUENCY MP_FPS_LOCK * 5 // how often to update global score.
|
||||
#define SCORE_FREQUENCY MP_FPS_LOCK * 15 // how often to update global score.
|
||||
|
||||
#define SYNC_PANIC 40000 // maximum time before doing a dirty fix. [not even used!]
|
||||
|
||||
|
|
Loading…
Reference in New Issue