Re: [CODE] Two ports open for the same MUD?

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 06/07/01


Pure Krome wrote:
> I'm hoping to have the stock code run on port 6666. No probs there.
> I'm now wanting to open another port, port 6667, which will handle
> some other stuff i have planned, but for the sake of this example,
> lets say on the SAME, SINGLE GAME PROCESS, i have two ports open
> that let u connect to the game.
>
> not two seperate processes of the same binary.
> so if i telnet to EITHER 6666 or 6667, I connect to the same game.

I had to do that to solve some firewalling issues with some of my game
staff, it's fairly easy to do, though, unfortunately, I can't remember
everything I did to accomplish it.  The best way to start is simply by
grepping the source for "port" (with the -i switch).  That should point
you in the direction of *most* things that need changing.  You'll also
have to grep for other key names and variables, etc. which you'll run
across in the stuff that turns up in the grep for "port".  The gist of it
is this, you just have to double up on all the variables and tests
required.

One thing on my to-do list is to create a snippet or patch that would
allow the MUD to bind to an unlimited number of ports simply by
specifying all of them on the command line (not that anyone really needs
something like this, it'd just be fun to do it).

Regards, Peter

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/05/01 PST