- attempt to make a few tweaks for more smooth network play

This commit is contained in:
Mark Vejvoda 2011-03-05 20:15:28 +00:00
parent fefed3e3ce
commit 9382473294
3 changed files with 4 additions and 2 deletions

View File

@ -1194,7 +1194,7 @@ bool ServerInterface::launchGame(const GameSettings *gameSettings) {
}
if(bOkToStart == true) {
bool useInGameBlockingClientSockets = Config::getInstance().getBool("EnableInGameBlockingSockets","false");
bool useInGameBlockingClientSockets = Config::getInstance().getBool("EnableInGameBlockingSockets","true");
if(useInGameBlockingClientSockets == true) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
for(int i= 0; i < GameConstants::maxPlayers; ++i) {

View File

@ -460,7 +460,7 @@ void IRCThread::execute() {
ircSession=NULL;
if(argv.size() != 3) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> IRC Usage: <server> <nick> <channel> : got params [%ld]\n",argv.size());
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> IRC Usage: <server> <nick> <channel> : got params [%ld]\n",(long int)argv.size());
return;
}

View File

@ -1380,6 +1380,7 @@ bool Socket::isConnected() {
//if the socket is not writable then it is not conencted
if(isWritable() == false) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s Line: %d] ERROR isWritable failed.\n",__FILE__,__FUNCTION__,__LINE__);
return false;
}
//if the socket is readable it is connected if we can read a byte from it
@ -1387,6 +1388,7 @@ bool Socket::isConnected() {
char tmp;
int err = peek(&tmp, 1, false);
if(err <= 0 && err != PLATFORM_SOCKET_TRY_AGAIN) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s Line: %d] ERROR Peek failed, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,err,getLastSocketErrorFormattedText().c_str());
return false;
}
}