Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2001:
[Freeciv-Dev] Re: Ping patch
Home

[Freeciv-Dev] Re: Ping patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Ping patch
From: Paul Zastoupil <paulz@xxxxxxxxxxxx>
Date: Sat, 17 Feb 2001 08:35:21 -0800

On Sat, Feb 17, 2001 at 03:41:08PM +0000, Vasco Alexandre Da Silva Costa wrote:
<with some snipping>
> This patch adds 2 things:
> 
> * added PACKET_CONN_PING & PACKET_CONN_PONG:
> 
>   GAME_DEFAULT_PINGTIMEOUT is 60 seconds right now.
> 
> * Also, added a max size of MAX_LEN_BUFFER to the send buffers,
> 
> PS: i didn't make the default ping timeout runtime user settable but that
> should be easy to do.  Just add some stuff in server/stdinhand.c, etc.

I think this should be added :)

> 
> Comments, praise or criticism would be appreciated.

I have wanted this for a long time.  I have observed 'stale' connections
often on civserver.freeciv.org.  The game is stuck waiting for the
player who hasn't been connected for hours.  If another client connects
(like me trying to see whats going on) it immediately gets a disconnect
message from the server about the 'stale' connection.

Something else that would be nice in this part of the code are different
disconnect infomation.  If the client explicitely disconnects it would
be nice to know this so you don't have to wait for the person to return
(unless they said they would be back) and you can immediately AI them.


Oh, and another comment on the actual code, perhaps there should
be a freelog in there near the:
close_socket_callback(pconn);

-- 
Paul Zastoupil



[Prev in Thread] Current Thread [Next in Thread]