(svn r20924) -Codechange: make the game connection packet handling look more like UDP/content packet handling

This commit is contained in:
rubidium
2010-10-15 13:47:37 +00:00
parent 8eb07d097e
commit 0ca7e4e82e
8 changed files with 387 additions and 303 deletions

View File

@@ -939,14 +939,14 @@ static bool NetworkReceive()
cs->writable = !!FD_ISSET(cs->sock, &write_fd);
if (FD_ISSET(cs->sock, &read_fd)) {
if (_network_server) {
NetworkServer_ReadPackets(cs);
cs->Recv_Packets();
} else {
NetworkRecvStatus res;
/* The client already was quiting! */
if (cs->HasClientQuit()) return false;
res = NetworkClient_ReadPackets(cs);
res = cs->Recv_Packets();
if (res != NETWORK_RECV_STATUS_OKAY) {
/* The client made an error of which we can not recover
* close the client and drop back to main menu */