[MUD-Dev] Re: mud client development systems

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Sat Dec 12 22:18:19 New Zealand Daylight Time 1998


[Sunny Gulati:]

 >option 2.  Client connects to mud at specific socket number. (has to be
 >specific, because even right now we're tunneling a hole to our mud
 >through a firewall on a specific port number).  How then do I associate
 >the 2nd socket connection with the original player object?

Remember that each client has their own socket anyway (unless you are
getting complicated and using multiplexor processes - I don't know
whether MUDOS does that or not). Which of two connections sockets the
client originally connects on doesn't matter for that. You only need to
keep track of which one it was inside the server's client structure,
so you'll know whether it is a telnet client or a custom client. That's
what I did in my AmigaMUD, and it wasn't a problem. Essentially, the
main 'select' of the server is waiting for activity from any client
socket, AND from either of the two connection sockets. It tells you
which sockets are active when it returns. If it says the activity is
on the telnet connection socket, then you know you have a new telnet
client. If it tells you the activity is on the custom client connection
socket, then you know you have a new custom client connection.

The socket stuff I've contributed to the DevMUD project does essentially
that, although it only sets initial defaults for telnet flags, rather
than setting a whole new client type, although the structure is there
to do that (deliberately so, since that's what I want). Jon Leonard
has the full archive of a runnable MUD system with that in it, at

    http://frost.slimy.com/devmud/prototypes/runnable/devmud-toy

--
Don't design inefficiency in - it'll happen in the implementation. - me

Chris Gray     cg at ami-cg.GraySage.Edmonton.AB.CA




More information about the MUD-Dev mailing list