1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Yet another update on threads and signals -->
<!--X-From-R13: Quevf Uenl <ptNnzv&#45;pt.UenlEntr.Sqzbagba.OP.QO> -->
<!--X-Date: Sat, 15 Aug 1998 13:54:07 &#45;0700 -->
<!--X-Message-Id: 199808152054.OAA06008@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--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] Re: Yet another update on threads and signals</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</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="msg00741.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00743.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00741.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00745.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00742">Author</A>
&nbsp;|&nbsp;<A HREF="#00742">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00742">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Yet another update on threads and signals</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: Yet another update on threads and signals</LI>
<LI><em>From</em>: Chris Gray &lt;<A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A>&gt;</LI>
<LI><em>Date</em>: Sat, 15 Aug 1998 14:54:10 -0600</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>
[Adam J. Thornton:]

 &gt;But then, don't I need one port per process?  There's no way for me to
 &gt;telnet to port 5019 in process 2231, for example.  So do I need to hand out
 &gt;a random port number in some range to each process?  
 &gt;
 &gt;The signals avoided having to have an arbitrary number of numbered ports
 &gt;open; I'm not sure which is the lesser evil.

Nope. I would use AF_UNIX sockets (as opposed to AF_INTERNET)
for the connections between the rooms. You access them via a filename,
such as /tmp/mud&lt;roomnumber&gt;. Once you have them open, they are just
like any other socket. So, the distributer would have an easy way to
find the socket for a newly created room process. The only port
exported over the internet would be the main one that users connect
at, and I would suggest it either be exported by the distributer, or
some other non-room process. When the user has been validated, and
their current room determined from the database, you pass them off
to that room, just like normal (except that there is no room for
them to be leaving from).

Actually, since you said the distributer creates the processes for
newly active rooms, I would have it create the socket, too. Then the
new room process would simply open it, by name, to have its connection
to the distributer. Note that these AF_UNIX sockets are strictly local
to your one computer, and so their port numbers are an irrelevant
detail - no process ever needs to know what they are. Actually, with
named sockets this way, you don't need to bounce things through the
distributer, come to think of it! To pass a player from one process
to another, just have the old room open the local socket to the new room,
write the info (and client socket) down it, then close it again. The new
room knows that only transfer messages come over its local socket,
so it knows to handle it different than stuff coming over client sockets.

-- 
Chris Gray     cg#ami-cg,GraySage.Edmonton.AB.CA


</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="00745" HREF="msg00745.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>
<ul compact><li><em>From:</em> "Adam J. Thornton" &lt;adam#phoenix,Princeton.EDU&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="msg00741.html">[MUD-Dev] Re: Yet another update on threads and signals</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00743.html">[MUD-Dev] Question for the list (Semi-OT)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00741.html">[MUD-Dev] Re: Yet another update on threads and signals</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00745.html">[MUD-Dev] Re: Yet another update on threads and signals</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00742"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00742"><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><A NAME="00728" HREF="msg00728.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 15 Aug 1998, 01:12 GMT
<UL>
<LI><strong><A NAME="00733" HREF="msg00733.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Sat 15 Aug 1998, 05:20 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00736" HREF="msg00736.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 15 Aug 1998, 15:31 GMT
<UL>
<LI><strong><A NAME="00741" HREF="msg00741.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Sat 15 Aug 1998, 19:22 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00742" HREF="msg00742.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 15 Aug 1998, 20:54 GMT
<UL>
<LI><strong><A NAME="00745" HREF="msg00745.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Sun 16 Aug 1998, 16:08 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00726" HREF="msg00726.html">[MUD-Dev] FW: UBE/high: Re: W IRED: Kilers have more fun</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 14 Aug 1998, 22:38 GMT
<UL>
<LI><strong><A NAME="00739" HREF="msg00739.html">[MUD-Dev] Re: FW: UBE/high: Re: W IRED: Kilers have more fun</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sat 15 Aug 1998, 18:18 GMT
<UL>
<LI><strong><A NAME="00793" HREF="msg00793.html">[MUD-Dev] Re: UBE/high: Re: FW: UBE/high: Re: W IRED: Kilers have more fun</A></strong>, 
Dr. Cat <a href="mailto:cat#bga,com">cat#bga,com</a>, Fri 21 Aug 1998, 04:26 GMT
</LI>
</UL>
</LI>
</UL>
</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>