The problem at hand is that you can't pass the client handle obtained
from the accept() onto another process, then go back and wait for another
connection. If you fire off a phantom, it's a new Process, and isn't able
to receive the handle from the other process.

Any suggestions? I considered the method of returning a new port number
and having the client reconnect on that port, but I'm not ready to go
that route just yet.

George

> -----Original Message-----
> From: [email protected] [mailto:u2-users-
> [email protected]] On Behalf Of Glen Batchelor
> Sent: Thursday, August 27, 2009 5:50 PM
> To: 'U2 Users List'
> Subject: Re: [U2] back to the socket problem....
>
>
> It appears that you are stacking instances of Program A on
> top of
> each other when you should be starting a client socket handler instead.
> The
> listen() socket function uses a single server socket handle to wait for
> all
> connections and then accept() creates one new socket handle for each
> incoming connection. You need to pass the client handle to another
> process
> and let it do its own thing for that one connection.
>
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to