mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
Keep gateway sockets open during handshake
This commit is contained in:
parent
c9d603d1c3
commit
7175374350
1 changed files with 10 additions and 0 deletions
|
@ -110,6 +110,7 @@ const char *neterror (void);
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PRE_CONNECT, // Sent from guest to host for initial connection
|
PRE_CONNECT, // Sent from guest to host for initial connection
|
||||||
|
PRE_KEEPALIVE,
|
||||||
PRE_DISCONNECT, // Sent from guest that aborts the game
|
PRE_DISCONNECT, // Sent from guest that aborts the game
|
||||||
PRE_ALLHERE, // Sent from host to guest when everybody has connected
|
PRE_ALLHERE, // Sent from host to guest when everybody has connected
|
||||||
PRE_CONACK, // Sent from host to guest to acknowledge PRE_CONNECT receipt
|
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);
|
SendConAck (doomcom.numnodes, numplayers);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PRE_KEEPALIVE:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (doomcom.numnodes < numplayers)
|
if (doomcom.numnodes < numplayers)
|
||||||
{
|
{
|
||||||
|
// Send message to everyone as a keepalive
|
||||||
|
SendConAck(doomcom.numnodes, numplayers);
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue