<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: Quick socket question --> <!--X-From-R13: Pra Uerrne <terrneNploreuvtujnl.arg> --> <!--X-Date: Sat, 7 Nov 1998 14:45:40 -0800 --> <!--X-Message-Id: Pine.LNX.3.96.981107153230.24280A-100000#shamen,cyberhighway.net --> <!--X-Content-Type: text/plain --> <!--X-Reference: 199811072106.PAA12088#zoom,bga.com --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, [MUD-Dev] Re: Quick socket question</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:greear#cyberhighway,net"> </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="msg00788.html">Previous</a> | <a href="msg00790.html">Next</a> ] Thread: [ <a href="msg00788.html">Previous</a> | <a href="msg00790.html">Next</a> ] Index: [ <A HREF="author.html#00789">Author</A> | <A HREF="#00789">Date</A> | <A HREF="thread.html#00789">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>[MUD-Dev] Re: Quick socket question</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: Quick socket question</LI> <LI><em>From</em>: Ben Greear <<A HREF="mailto:greear#cyberhighway,net">greear#cyberhighway,net</A>></LI> <LI><em>Date</em>: Sat, 7 Nov 1998 15:36:57 -0700 (MST)</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> I run on Slackware, 3.3 right now, which is older than redhat 5.0. If I do a proper shutdown (with the close(socket_descriptor) call), then I can re-bind to it in a matter of seconds. Make sure you are checking the return values for all such system calls. Also, I log-out every connected descriptor before I try to close the main listening socket. That might have something to do with it. Ben On Sat, 7 Nov 1998, Dr. Cat wrote: > Well, we were going to install Solaris 86 on the Furcadia server machine > to replace the buggy older version of BSDI it had on it. But the > sysadmin out there suggested going to Red Hat Linux instead, because it's > a BDS family rather than a SYSV family, and there might be fewer > problems. I agreed. I don't know how hard getting it going on SYSV > would have been, but I know my O'Reilly "Using C on the Unix system" is > so old that it says Berkeley Unixes have sockets and SYSV don't! Surely > SYSV has to have sockets now, what with this "internet" thing having > gotten so popular since this book was written - don't they? > > Anyway, I got a couple compatibility problems involving select() and > accept() worked out, but I've noticed the return of a problem we > sometimes had under Linux with the old DragonSpires server, which is the > ancestor of the Furcadia server code. After the game is shut down or the > server code crashes, and it tries to restart, it fails to bind the port > for the next 15-20 minutes. This is an improvement over the Linux of 4 > years ago, which apparently didn't have a timeout for this case and would > leave the game unaccessible for hours, days, or potentially forever until > I could successfully beg the uncooperative sysadmin of that system for a > reboot! Still, I'd like to fix this problem if I can. > > I thought at first it was because I wasn't closing the socket when the > accept() problem I was having crashed it. But I did a proper operator > shutdown, which takes the bound socket and does shutdown(mastsock, 2) > and close(mastsock) before existing. Do I need to do anything more on > closing to make sure the port is freed up, even if there's some > recalcitrant user's machine out there still desperately trying to talk to > it? Or is there a setsockopt option I need to set differently? Or is > there a sysadmin tweak to change that timeout value? If anyone's dealt > with this issue under Linux before (or any other Unix that has the same > issue) I'd appreciate a pointer. :X) > > *-------------------------------------------**-----------------------------* > Dr. Cat / Dragon's Eye Productions || Free alpha test: > *-------------------------------------------** <A HREF="http://www.bga.com/furcadia">http://www.bga.com/furcadia</A> > Furcadia - a new graphic mud for PCs! || Let your imagination soar! > *-------------------------------------------**-----------------------------* > > P.S. I've been to busy to reply to anything on the list, but Raph, I > really liked the Laws page you set up, and I sent the URL to all of our > volunteer staff and to some friends to browse through. Though I would > have worded that stamp collector thing a lot differently. I'm still > waiting for that lunch if you want to talk about how to revise that or > anything. :X) > > -- > MUD-Dev: Advancing an unrealised future. > Ben Greear (greear#cyberhighway,net) <A HREF="http://www.primenet.com/~greear">http://www.primenet.com/~greear</A> Author of ScryMUD: mud.primenet.com 4444 <A HREF="http://www.primenet.com/~greear/ScryMUD/scry.html">http://www.primenet.com/~greear/ScryMUD/scry.html</A> </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00788" HREF="msg00788.html">[MUD-Dev] Quick socket question</A></STRONG> <UL><LI><EM>From:</EM> "Dr. Cat" <cat#bga,com></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00788.html">[MUD-Dev] Quick socket question</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00790.html">[MUD-Dev] Re: Quick socket question</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00788.html">[MUD-Dev] Quick socket question</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00790.html">[MUD-Dev] Re: Quick socket question</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00789"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00789"><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="00796" HREF="msg00796.html">[MUD-Dev] Re: ScryMUD [CUSTOM] Released under GNU General Public License</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 08 Nov 1998, 06:25 GMT <LI><strong><A NAME="00795" HREF="msg00795.html">[MUD-Dev] ScryMUD [CUSTOM] Released under GNU General Public License</A></strong>, Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sun 08 Nov 1998, 05:55 GMT <LI><strong><A NAME="00792" HREF="msg00792.html">[MUD-Dev] Re: Quick socket question</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 08 Nov 1998, 02:52 GMT <LI><strong><A NAME="00788" HREF="msg00788.html">[MUD-Dev] Quick socket question</A></strong>, Dr. Cat <a href="mailto:cat#bga,com">cat#bga,com</a>, Sat 07 Nov 1998, 21:27 GMT <UL> <LI><strong><A NAME="00789" HREF="msg00789.html">[MUD-Dev] Re: Quick socket question</A></strong>, Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sat 07 Nov 1998, 22:45 GMT </LI> <LI><strong><A NAME="00790" HREF="msg00790.html">[MUD-Dev] Re: Quick socket question</A></strong>, Jon Leonard <a href="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</a>, Sat 07 Nov 1998, 22:48 GMT <UL> <LI><strong><A NAME="00791" HREF="msg00791.html">[MUD-Dev] Re: Quick socket question</A></strong>, Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Sat 07 Nov 1998, 23:24 GMT </LI> </UL> </LI> <LI><strong><A NAME="00793" HREF="msg00793.html">[MUD-Dev] Re: Quick socket question</A></strong>, J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Sun 08 Nov 1998, 04:02 GMT <UL> <LI><strong><A NAME="00803" HREF="msg00803.html">[MUD-Dev] Re: Quick socket question</A></strong>, J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 10 Nov 1998, 02:01 GMT </LI> </UL> </LI> </UL> </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>