add new commandline option --use-udp. Not yet used.

This commit is contained in:
Eric House 2013-08-06 21:10:42 -07:00
parent 470dbb5304
commit b9450589c8
2 changed files with 6 additions and 0 deletions

View file

@ -633,6 +633,7 @@ typedef enum {
,CMD_NOPEEK
,CMD_SPLITPACKETS
,CMD_CHAT
,CMD_USEUDP
#ifdef XWFEATURE_CROSSHAIRS
,CMD_NOCROSSHAIRS
#endif
@ -740,6 +741,7 @@ static CmdInfoRec CmdInfoRecs[] = {
,{ CMD_SPLITPACKETS, true, "split-packets", "send tcp packets in "
"sections every random MOD <n> seconds to test relay reassembly" }
,{ CMD_CHAT, true, "send-chat", "send a chat every <n> seconds" }
,{ CMD_USEUDP, false, "use-udp", "connect to relay new-style, via udp not tcp" }
#ifdef XWFEATURE_CROSSHAIRS
,{ CMD_NOCROSSHAIRS, false, "hide-crosshairs",
"don't show crosshairs on board" }
@ -2252,6 +2254,9 @@ main( int argc, char** argv )
case CMD_CHAT:
mainParams.chatsInterval = atoi(optarg);
break;
case CMD_USEUDP:
mainParams.useUdp = true;
break;
#ifdef XWFEATURE_CROSSHAIRS
case CMD_NOCROSSHAIRS:
mainParams.hideCrosshairs = XP_TRUE;

View file

@ -99,6 +99,7 @@ typedef struct LaunchParams {
XP_Bool skipGameOver;
XP_Bool useMmap;
XP_Bool closeStdin;
XP_Bool useUdp;
XP_U16 splitPackets;
XP_U16 chatsInterval; /* 0 means disabled */
#ifdef XWFEATURE_SEARCHLIMIT