From 97aadb6a44dea442837946dfe0f8254273146fdf Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 23 Mar 2013 23:00:11 +0000 Subject: [PATCH] - try to improve network performance --- source/glest_game/network/client_interface.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index d28a23ea..bf9cf448 100644 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -79,9 +79,9 @@ void ClientInterfaceThread::execute() { Chrono chrono; // Set socket to blocking - //if(clientInterface != NULL && clientInterface->getSocket(true) != NULL) { - // clientInterface->getSocket(true)->setBlock(true); - //} + if(clientInterface != NULL && clientInterface->getSocket(true) != NULL) { + clientInterface->getSocket(true)->setBlock(true); + } for(;this->clientInterface != NULL;) { if(getQuitStatus() == true) { @@ -1782,8 +1782,8 @@ NetworkMessageType ClientInterface::waitForMessage(int waitMicroseconds) return msg; } // Sleep every x milli-seconds we wait to let other threads work - else if(chrono.getMillis() % 100 == 0) { - sleep(10); + else if(chrono.getMillis() % 5 == 0) { + sleep(1); } //sleep(waitSleepTime);