[Home] [Groups] - Message: [Prev in Group] [Next in Group]
1294: Re: So in an event-driven server, how do you ...
[Full Header] [Plain Text]
From: S001GMU@nova.wright.edu
Newsgroups: nu.kanga.list.mud-dev
Date: Mon, 07 Apr 1997 15:09:54 -0400 (EDT)
Organization: Kanga.Nu
Date: Mon, 07 Apr 1997 13:39:45 -0400 (EDT)
From: Michael Hohensee <michael@sparta.mainstream.net>
>It looks like you guys hate polling. (Not that I blame you, I don't
>really like it myself. :) But if you've got a system that just sits
>until the next "ripening", how do you do your IO with players? Do you
>use an endless loop to poll the connections? Or do you use the SIGIO
>signal?
I don't have too much expereince with event driven systems (still haven't
decided which way I'm gonna go with my system, but it will probably be event
driven), but my first impulse would be to have the system drop an event in the
queue which, when it ripens, would check for any player I/O and then drop
"itself" back in the queue to go off at some reasonable interval later (every
second - 1/2 second? whatever). Essentially an infinite polling loop done
with events.
probably want one of those events for each socket connected so people's
commands don't always go off at the same time.
-Greg