1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] OT: Socket programming &#45; platform specific -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Sat, 24 Jan 1998 19:46:36 +0000 -->
<!--X-Message-Id: 199801241946.NAA15649@dfw&#45;ix9.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 9801231451.8r8g@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] OT: Socket programming - platform specific</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:jlsysinc#ix,netcom.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="msg00303.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00305.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00295.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00306.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00304">Author</A>
&nbsp;|&nbsp;<A HREF="#00304">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00304">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] OT: Socket programming - platform specific</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] OT: Socket programming - platform specific</LI>
<LI><em>From</em>: "Jon A. Lambert" &lt;<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>&gt;</LI>
<LI><em>Date</em>: Sat, 24 Jan 1998 14:48:51 -4</LI>
<LI><em>Comments</em>: Authenticated sender is &lt;jlsysinc#popd,ix.netcom.com&gt;</LI>
<LI><em>Reply-to</em>: <A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On 23 Jan 98 at 7:57, Chris Gray wrote:
&gt; [Jon Lambert:]
&gt; 
&gt; :Win32s,Win95 and WinNT sockets programming is virtually identical to
&gt; :Unix BSD sockets.
&gt; 
&gt; Nod. Socket programming experience, at least at the level normally needed
&gt; for MUDs, should be interchangeable between UNIX and Win32. The *only*
&gt; Windows program I've done was to port my ToyMUD server to it, and the
&gt; changes were small (mostly involving the points Jon has mentioned about
&gt; the WSAStartup and WSAGetNextError stuff).
                           ^^^^
&lt;heh&gt; I wish I had the above function. It sure would make debugging
easier.  Sort of a kernel precognition function. ;)

&gt; I did find that WinSock is
&gt; a bit pickier than UNIX - it cared about a wrongly initialized family in
&gt; an address, whereas UNIX didn't. The one issue I did not manage to resolve
&gt; is that of shutdown - a control-C typed in the shell window running the
&gt; server creates a thread in the server process, but does *not* interrupt
&gt; any currently executing WinSock call. So, using that technique to shut
&gt; down your server isn't fully satisfactory. However, WinSock seems to
&gt; silently shorten the waits on 'select' to about 10 seconds, so if you
&gt; have a 'ShutDown' flag which is checked in your main idle loop, you'll
&gt; end up shutting down within 10 seconds of the control-C.

A possible solution is to install a SIGINT handler and from within it
call WSACancelBlockingCall() followed by WSACleanup().  It should cancel 
outstanding Select()'s.   

--
--/*\ Jon A. Lambert - TychoMUD     Internet:jlsysinc#ix,netcom.com /*\--
--/*\ Mud Server Developer's Page &lt;<A  HREF="http://www.netcom.com/~jlsysinc">http://www.netcom.com/~jlsysinc</A>&gt; /*\--
--/*\   "Everything that deceives may be said to enchant" - Plato   /*\--

</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="00306" HREF="msg00306.html">Re: [MUD-Dev] OT: Socket programming - platform specific</A></strong>
<ul compact><li><em>From:</em> Caliban Tiresias Darklock &lt;caliban#darklock,com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00295" HREF="msg00295.html">Re: [MUD-Dev]	OT: Socket programming - platform specific</A></STRONG>
<UL><LI><EM>From:</EM> cg#ami-cg,GraySage.Edmonton.AB.CA (Chris Gray)</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00303.html">Re: [MUD-Dev] Clients based on Netscape 5?</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00305.html">Re: [MUD-Dev] Clients based on Netscape 5?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00295.html">Re: [MUD-Dev]	OT: Socket programming - platform specific</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00306.html">Re: [MUD-Dev] OT: Socket programming - platform specific</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00304"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00304"><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: [MUD-Dev] Clients based on Netscape 5?</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00311" HREF="msg00311.html">Re: [MUD-Dev] Clients based on Netscape 5?</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Sun 25 Jan 1998, 18:28 GMT
</LI>
</ul>
</ul>
<LI><strong><A NAME="00442" HREF="msg00442.html">Re: [MUD-Dev] Clients based on Netscape 5?</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Thu 12 Feb 1998, 22:07 GMT
</LI>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00301" HREF="msg00301.html">Clients based on Netscape 5?</A></strong>, 
Greg Munt <a href="mailto:greg#uni-corn,demon.co.uk">greg#uni-corn,demon.co.uk</a>, Sat 24 Jan 1998, 01:16 GMT
<LI><strong><A NAME="00295" HREF="msg00295.html">Re: [MUD-Dev]	OT: Socket programming - platform specific</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 23 Jan 1998, 15:49 GMT
<UL>
<LI><strong><A NAME="00304" HREF="msg00304.html">Re: [MUD-Dev] OT: Socket programming - platform specific</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sat 24 Jan 1998, 19:46 GMT
<UL>
<LI><strong><A NAME="00306" HREF="msg00306.html">Re: [MUD-Dev] OT: Socket programming - platform specific</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Sun 25 Jan 1998, 01:15 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00297" HREF="msg00297.html">RE: [MUD-Dev]  Graphical mud perspectives</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 23 Jan 1998, 15:47 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00298" HREF="msg00298.html">Re: [MUD-Dev]  Graphical mud perspectives</A></strong>, 
Mike Sellers <a href="mailto:mike#online-alchemy,com">mike#online-alchemy,com</a>, Fri 23 Jan 1998, 17:42 GMT
</LI>
<LI><strong><A NAME="00299" HREF="msg00299.html">RE: [MUD-Dev]  Graphical mud perspectives</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 23 Jan 1998, 18:21 GMT
</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>