[Freeciv-Dev] Re: (PR#9524) server should never timeout in single-player
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9524 >
On Thu, 30 Sep 2004, Benoit Hudson wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9524 >
>
> On Thu, Sep 30, 2004 at 12:20:51AM -0700, Jason Short wrote:
> > But this means the client doesn't get pinged.
> >
> > Or more accurately, it still gets pinged when it first connects, but
> > never thereafter. So the ping info will be shown but will be stale.
> > Not so good. Should be easy to avoid though.
>
> OK; should we ping, but just don't disconnect if there's no reply?
If you think this will stop all connection losses: it won't. There are two
more places where there may be connection loss: one is controlled by the
netwait parameter, another can happen when the network buffer grows past
the size limit.
Why is this so? For several reasons. One is that on multiplayer, the
server cannot wait eternally for a lagging client. Memory isn't infinite
to store on backlog all the network updates. The alternatives are:
i) Stall the server and wait for that client to catch up (bad on
multiplayer, because you just ruined the day for everyone else)
ii) Drop packets. This would be nice, but the protocol isn't structured
that way.
> Alternatively, with connection level hack, do we care if the ping info
> is stale? If it's on hack, then we're probably debugging.
IMHO we should just make a special cmdlevel hack option for single player
that causes all select() calls to block indefinitely and disables
pingtimeout. Or, alternatively, two separate options that do this. It
would be the simplest solution, in the order of 20 lines of code or
so. Oh and it should *not* be enabled by default for all cmdlevel hack
players.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#9524) server should never timeout in single-player mode,
Vasco Alexandre da Silva Costa <=
|
|