[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library

Adam J. Thornton adam at phoenix.Princeton.EDU
Wed Aug 5 00:38:40 CEST 1998


I don't have a problem with socket programming _per se_, but I have run
into an interesting problem.

My world-model is room-based.

Thus, when someone connects to a particular server or changes rooms within
a server, the connection-handling daemon checks to see if anyone is in the
room; if not a new process is created, one process per room.

That process then loads all the data for things in the room from the
database and keeps it in in-memory structures.  The player connection gets
a thread within that process.

What I haven't satisfactorily solved is the case where the room already has
players in it and I want to put a new player in the room.  Sending a signal
to the process I want to create a new connection thread in is relatively
straightforward (thus letting the signal handler deal with the
initialization of the player thread), but passing the filehandle that
represents the player's connection into the pre-existing process is not
something I immediately clearly see how to do cleanly.

Any thoughts?  How do I cleanly manage the handoff of a socket connection
from one process into a preexisting and already-initialized process?

Adam
--
adam at princeton.edu 
"There's a border to somewhere waiting, and a tank full of time." - J. Steinman




More information about the mud-dev-archive mailing list