<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: So in an event-driven server, how do you ... --> <!--X-From-R13: @nguna Kbfcr <lbfcrNunjnvv.rqh> --> <!--X-Date: from babe.globecomm.net [207.51.48.8] by mx01.ca.us.ibm.net id 860445747.204001-1 Mon Apr 7 20:42:27 1997 --> <!--X-Message-Id: Pine.GSO.3.95q.970407103158.16173A-100000@uhunix2 --> <!--X-Content-Type: text/plain --> <!--X-Reference: 199704071758.RAA543716#out2,ibm.net --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: So in an event-driven server, how do you ...</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:yospe#hawaii,edu"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00042.html">Previous</a> | <a href="msg00041.html">Next</a> ] Thread: [ <a href="msg00039.html">Previous</a> | <a href="msg00046.html">Next</a> ] Index: [ <A HREF="author.html#00040">Author</A> | <A HREF="#00040">Date</A> | <A HREF="thread.html#00040">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: So in an event-driven server, how do you ...</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: Multiple Recipients of MUD Design Mailing List <<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>></LI> <LI><em>Subject</em>: Re: So in an event-driven server, how do you ...</LI> <LI><em>From</em>: Nathan Yospe <<A HREF="mailto:yospe#hawaii,edu">yospe#hawaii,edu</A>></LI> <LI><em>Date</em>: Mon, 7 Apr 1997 10:42:02 -1000</LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> On Mon, 7 Apr 1997, Michael Hohensee wrote: : :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'm not sure about the others, but I have a thread for each connection, set to wait for the condition buffer.notEmpty(). It begins char peeking on the buffer with the first character... if the input is an instant (control, or editor, or such) it wakes up and starts processing. If not, it sets itself to wait for the condition buffer.lineReturned(), and grabs all completed lines, sending them off to appropriate destinations. One of these destinations is the Character interpreter, which instantly interprets and drops on the local queue. (running off of the socket thread, not the queue's thread) The queue grabs all of these at its own leisure (meaning the moment it has a free cycle.) :I tried to use both. I poll for new commands from the players, and use :the SIGIO signal to hook up a new connection. More than a little bit :dirty. It doesn't work under BSD, then I have to poll for everything. I'm not sure about BSD, but I think there is a pThreads port for it, and letting the threads handle polling of that sort is a lot more efficient and effective, in my experience. I'm not sure how the implementation of BSD would do it, but most thread implementations support low profile polling in their wait() implementations. :Michael Hohensee :-- :Eagleson's Law: : Any code of your own that you haven't looked at for six or more :months, might as well have been written by someone else. (Eagleson is :an optimist, the real number is more like three weeks.) *chuckle* He's right. I'm trying to pick apart some code I wrote three years ago. What _is_ this stuff, and who wrote it, so I can track him down and _shoot_ him. __ _ __ _ _ , , , , /_ / / ) /_ /_) / ) /| /| / /\ First Light of a Nova Dawn / / / \ /_ /_) / \ /-|/ |/ /_/ Final Night of a World Gone Nathan F. Yospe - University of Hawaii Dept of Physics - yospe#hawaii,edu </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00042.html">Re: Greetings. :)</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00041.html">Re: Random thoughts</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00039.html">Re: So in an event-driven server, how do you ...</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00046.html">Re: So in an event-driven server, how do you ...</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00040"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00040"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>Re: Yet Another Introduction</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00105" HREF="msg00105.html">Re: Yet Another Introduction</A></strong>, Adam Wiggins <a href="mailto:nightfall#user1,inficad.com">nightfall#user1,inficad.com</a>, Sat 12 Apr 1997, 22:48 GMT </LI> </ul> </LI> <LI><strong><A NAME="00049" HREF="msg00049.html">Off on the languages tangent!</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 08 Apr 1997, 13:07 GMT <LI><strong><A NAME="00038" HREF="msg00038.html">So in an event-driven server, how do you ...</A></strong>, Michael Hohensee <a href="mailto:michael#sparta,mainstream.net">michael#sparta,mainstream.net</a>, Tue 08 Apr 1997, 00:35 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00039" HREF="msg00039.html">Re: So in an event-driven server, how do you ...</A></strong>, S001GMU <a href="mailto:S001GMU#nova,wright.edu">S001GMU#nova,wright.edu</a>, Tue 08 Apr 1997, 02:10 GMT </LI> <LI><strong><A NAME="00040" HREF="msg00040.html">Re: So in an event-driven server, how do you ...</A></strong>, Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 08 Apr 1997, 03:42 GMT </LI> <LI><strong><A NAME="00046" HREF="msg00046.html">Re: So in an event-driven server, how do you ...</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 08 Apr 1997, 13:08 GMT </LI> <LI><strong><A NAME="00090" HREF="msg00090.html">Re: So in an event-driven server, how do you ...</A></strong>, clawrenc <a href="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</a>, Sat 12 Apr 1997, 04:31 GMT </LI> <LI><strong><A NAME="00088" HREF="msg00088.html">Re: So in an event-driven server, how do you ...</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 12 Apr 1997, 04:38 GMT </LI> </UL> </LI> <LI><strong><A NAME="00023" HREF="msg00023.html">Re: Resets and repops</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sun 06 Apr 1997, 04:08 GMT </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>