1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine -->
<!--X-From-R13: "Fbqq Znve" <gynveNznvymbar.pbz> -->
<!--X-Date: Fri, 17 Jul 1998 17:35:37 &#45;0700 -->
<!--X-Message-Id: 199807180034.RAA00149#scaup,prod.itd.earthlink.net -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:tlair#mailzone,com">
</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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00243.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00245.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00695.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00247.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00244">Author</A>
&nbsp;|&nbsp;<A HREF="#00244">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00244">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: "MUD Dev" &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: [MUD-Dev] [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</LI>
<LI><em>From</em>: "Todd Lair" &lt;<A HREF="mailto:tlair#mailzone,com">tlair#mailzone,com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 17 Jul 1998 20:37:18 +0000</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>


Ok, I know it's been stated that we are allowed to discuss implementations of what we 
want to code, and because I've seen virtually no discussion of this type, I'm still a little 
leery of whether what follows is a-ok.  If, by any chance, you think such C++/Unix specific 
topics are out of order here, please hit your delete key now.  I, being a big wus, would 
much prefer that than someone's atomic flame thrower, or *cringe* a message from the list 
owner.  I'll regard no response as an indication that I was out of line, and will continue 
trying to figure it out myself.


Anyway, on with my question.  I have recently written my event engine, and I'm trying to 
get optimal player socket polling using this engine.  There are two different types of 
socket objects, a master, and a socket.  A master has an event associated with it, that 
when the event is ripened, it polls it's input.  Successful poll indicates that there is a new 
connection, and a player object should be allocated.  A socket type is associated with a 
little more of an event in that its input, output, and exception status is polled to indicate 
player input, output or exception on that socket.  The socket class is inherited from the 
player class.

Now, as far as the polling for both types of sockets, I'm wondering if there isn't a more 
efficient way than what I'm doing.  What I'm doing is using select, however, I'm only 
setting the single bit for the the descriptor in question for all three fd_sets.  This seems 
like a big mistake to me, since I imagine, as the descriptors get larger in number, that the 
select call has to see if each bit is set for the lower descriptor numbers till it gets to the 
single set one.

I was wondering if I should just call recv, with the peek option (maybe with the input 
buffer) set as a single byte, to see if the socket has something to read or is in exception.  
Would this be the optimal way to do it, or is select fine?  Also, do I have to check on the 
output status?  Is there a time when a socket is not writable?  What are return values of 
recv that would indicate exceptions, or rather what should I be on the lookout for with 
respect to errno's value?


I look forward to hearing any thoughts regarding the above, and thanks in advance!

Todd



</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00268" HREF="msg00268.html">[MUD-Dev] Re: Affordances and social method</A></strong>
<ul compact><li><em>From:</em> Hans-Henrik Staerfeldt &lt;hhs#cbs,dtu.dk&gt;</li></ul>
<li><strong><A NAME="00247" HREF="msg00247.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engin</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00243.html">[MUD-Dev] Re: UBE/high: Re: Affordances and  social method (Was: Re: Wi</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00245.html">[MUD-Dev] Re: WIRED: Kilers have more fun</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00695.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00247.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engin</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00244"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00244"><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>[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00684" HREF="msg00684.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 12 Aug 1998, 16:44 GMT
</LI>
<LI><strong><A NAME="00693" HREF="msg00693.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</A></strong>, 
Gevan <a href="mailto:shanos#es,co.nz">shanos#es,co.nz</a>, Wed 12 Aug 1998, 18:57 GMT
</LI>
</ul>
<LI><strong><A NAME="00674" HREF="msg00674.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 12 Aug 1998, 04:05 GMT
<UL>
<LI><strong><A NAME="00695" HREF="msg00695.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</A></strong>, 
T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Wed 12 Aug 1998, 22:43 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00244" HREF="msg00244.html">[MUD-Dev] [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</A></strong>, 
Todd Lair <a href="mailto:tlair#mailzone,com">tlair#mailzone,com</a>, Sat 18 Jul 1998, 00:35 GMT
<UL>
<LI><strong><A NAME="00247" HREF="msg00247.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engin</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sat 18 Jul 1998, 01:53 GMT
</LI>
<LI><strong><A NAME="00268" HREF="msg00268.html">[MUD-Dev] Re: Affordances and social method</A></strong>, 
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Mon 20 Jul 1998, 12:31 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00242" HREF="msg00242.html">[MUD-Dev] Java VM performance</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Fri 17 Jul 1998, 17:51 GMT
<LI><strong><A NAME="00236" HREF="msg00236.html">[MUD-Dev] Re: Job offer for multiplayer game development</A></strong>, 
S. Patrick Gallaty <a href="mailto:choke#sirius,com">choke#sirius,com</a>, Thu 16 Jul 1998, 05:48 GMT
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>