- try to improve network performance

This commit is contained in:
Mark Vejvoda 2013-03-23 23:00:11 +00:00
parent c36e8297fa
commit 97aadb6a44
1 changed files with 5 additions and 5 deletions

View File

@ -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);