keep alive
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@459 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -204,6 +204,17 @@ void sendpackettoserv(void *packet)
|
||||
else localclienttoserver((ENetPacket *)packet);
|
||||
}
|
||||
|
||||
void c2skeepalive()
|
||||
{
|
||||
if(clientnum<0 || !clienthost) return;
|
||||
if(lastmillis-lastupdate<40) return;
|
||||
|
||||
ENetEvent event;
|
||||
while(clienthost!=NULL && enet_host_service(clienthost, &event, 0)>0) {}; // fixme
|
||||
|
||||
lastupdate = SDL_GetTicks();
|
||||
};
|
||||
|
||||
extern string masterpwd;
|
||||
|
||||
void c2sinfo(dynent *d) // send update to the server
|
||||
|
||||
Reference in New Issue
Block a user