From: Coby Beck
Subject: multi-processing and socket-streams
Date: 
Message-ID: <_JGt7.261790$8c3.45698287@typhoon.tampabay.rr.com>
Hi,

While a couple of the specifics are vendor questions and I will be enquiring
there, I wouldn't mind a little general advice about what i am trying to
design.

The implementation is LWW 4.1.20.  The problem is setting up a rendezvous with
a client on a dynamically allocated port and getting back the socket-stream.

Specifically, I have a server listening on a pre-configured port.  When a
client connects, a command/response stream is established.  I need (I think) to
maintain this stream for continued command processing while opening another
stream with this same client on which to receive a stream of potentially any
kind of data.  I am trying to do this by sending the client an ID and a
dynamically allocated port number to connect to, identify itself on and start
sending a data stream.  My difficulty is how to (a) get the stream or
connection handle back after spawning a new server process on that port (using
LW start-up-server) or (b) how to listen for incoming connections without
spawning another process.  I need the command stream still around so the client
can control when to stop waiting for more data and when to start again and when
to close the connection.

Does this pass the sanity checks?  And what are the pitfalls I should watch out
for.  Speciffically I'm a little worried about clients crashing and me leaving
orphaned processes lying around.

Specific or general advice or references are all greatly appreciated!

Coby
--
(remove #\space "coby . beck @ opentechgroup . com")