Keep gateway sockets open during handshake

This commit is contained in:
Edward Richardson 2014-10-05 19:46:34 +13:00
parent c9d603d1c3
commit 7175374350
1 changed files with 10 additions and 0 deletions

View File

@ -110,6 +110,7 @@ const char *neterror (void);
enum
{
PRE_CONNECT, // Sent from guest to host for initial connection
PRE_KEEPALIVE,
PRE_DISCONNECT, // Sent from guest that aborts the game
PRE_ALLHERE, // Sent from host to guest when everybody has connected
PRE_CONACK, // Sent from host to guest to acknowledge PRE_CONNECT receipt
@ -548,10 +549,15 @@ bool Host_CheckForConnects (void *userdata)
SendConAck (doomcom.numnodes, numplayers);
}
break;
case PRE_KEEPALIVE:
break;
}
}
if (doomcom.numnodes < numplayers)
{
// Send message to everyone as a keepalive
SendConAck(doomcom.numnodes, numplayers);
return false;
}
@ -822,6 +828,10 @@ bool Guest_WaitForOthers (void *userdata)
}
}
packet.Fake = PRE_FAKE;
packet.Message = PRE_KEEPALIVE;
PreSend(&packet, 2, &sendaddress[1]);
return false;
}