Subject: Re: Yet more onc() woes...

From: [email-masked] (Gustavo Glusman)
Date: Sun, 26 Sep 1993 04:59:05 -0700

>The hassle starts when (for some reason I'm not sure about), CardiffMOO
>momentarily looses its side of the onc().  The CardiffMOO server thinks that
>the link to LambdaMOO has been dropped (it goes as far as calling the :disfunc
>on the CardiffMOO side of the connection) and then automatically attempts to
>reestablish the connection by doing the whole a-d sequence detailed above.
Well, I can add another instance of the same event.
To put it simple: let's say I'm connected to the MOO by the client MUDDweller.
Suddenly, my Mac crashes. I reboot it. Obviously, my Mac 'lost it's side of
the onc()'. It does a call to my patience:disfunc(), too.

>BUT, there are instances when LambdaMOO's server doesn't detect the dropped
>connection.  As far as it is concerned, CardiffMOO is still there (albeit
>rather quiet).  In this case, when CardiffMOO attempts a reconnection it
>connects to a player, CardiffMOO@LambdaMOO which is STILL logged in and viable
>as far as the LambdaMOO server is concerned.  So LambdaMOO's server does a:
>
>        *** Redirecting old connection to this port ***
>
Similarly, there are lots of instances (I think almost every time, but
can't say for sure) when the MOO server doesn't detect the crash. I'm still
there, and quiet, too. People keep talking to me, and I ignore them rudely.
Then, after startup, I connect again, and get the *** Redirecting... message.
And now it's my turn to start explaining to the other players that 'I just
had to reconnect, I wasn't here all the time'.
If I don't reconnect, I am booted after some time.

>1)  Anyone have any idea why a broken onc() on CardiffMOO's side is not
>    reflected by a break in the connection on LambdaMOO's side.

Is there any way for the MOO server to know that my client isn't there anymore?
Are packets being sent all the time, even if there is no activity in either
direction?
When does the server decide to boot me?
If the server can detect that I'm not responding anymore for some time,
could a new built-in function be implemented, some idlefunc()? (I mean, in
the likeness of player:confunc() and player:disfunc().)

---

From: Pavel Curtis <[email-masked]>
Date: Sun, 26 Sep 1993 11:48:01 -0700

> Date:	Sun, 26 Sep 1993 04:59:05 -0700
> From:	[email-masked] (Gustavo Glusman)
> 

Not unless the TCP orderly shutdown proceeds normally (not guaranteed) or the
operating system's TCP code times out on the receipt of an acknowledgement
packet from your site (usually on the scale of several minutes).  In short,
there isn't any timely and reliable way for the server to know this given the
current standard Telnet-like basic client protocol.

> Are packets being sent all the time, even if there is no activity
> in either direction?

At the abstraction level of the server and client, no data is sent unless
there's some actual user-visible input or output.  Below that, at the operating
system TCP implementation layer, `keep-alive' packets are sent every several
minutes that are supposed to be acknowledged by the peer; failure to do so
within a certain timeout period and with a certain number of retries signals a
disorderly connection shutdown.

> When does the server decide to boot me?

When the operating system decides that the TCP connection has dropped, in
either an orderly or disorderly fashion.

> If the server can detect that I'm not responding anymore for some time, could
> a new built-in function be implemented, some idlefunc()? (I mean, in the
> likeness of player:confunc() and player:disfunc().)

The server could detect when you haven't sent any input for a certain period of
time, but it's not really possible for it to tell whether or not you're seeing
the output it's sending to you.  I don't understand precisely what you're
asking for here.

	Pavel