Dedicated server - Page 2

Dedicated server

Requests for features in the spring code.

Moderator: Moderators

User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

After some tests, it seems that following code from GameServer.cpp always returns the last received message on AutoHost interface:
"std::string msg = hostif->GetChatMessage();"

So when we send only one message on AutoHost interface, the server thinks he's receiving tons of new chat messages on AutoHost interface.

Maybe this behavior is Linux specific because Springie does not seem to be impacted. Or maybe I'm wrong somewhere...

A workaround is to send an empty UDP packet after each chat message on AutoHost interface.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

I think I found the error.
There was no check for socket errors like EWOULDBLOCK. It returned the uninitialized buffer which still contained the old data over and over again.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

Fixed indeed ;)
Post Reply

Return to “Feature Requests”