[DGD]Timeouts (ugh)
Stephen Schmidt
schmidsj at union.edu
Tue Jan 16 22:17:04 CET 2001
On Tue, 16 Jan 2001, Imo Wright wrote:
> How do I get it so that the driver/lib/whatever disconnects
> people after they have idled for a certain length of time? Do I
> use a heartbeat, or something more complicated and fantastical?
Heartbeat will work, but it's a little clunky.
Another way is to use call_out. Each time the user sends
a command, call_out to a function that disconnects them.
When they send the next command, cancel the old call_out
and replace it with a new one (with more time on it).
Another solution, easier but less precise, is to do it
in the users daemon. Every couple of minutes, go through
the list of users and force to quit all users who are
idle more than X time. The problem is that you wouldn't
get disconnected after X time of idle, but after X plus
the time to the next sweep.
I think most LPMuds use method 1, since they usually
have heart_beat on anyway, in which case the cost of
doing this as well isn't high. If you plan to have a
permanent heart_beat also, that's what I'd recommend.
Otherwise I'd probably suggest method 3.
Steve
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list