Re: socket() returning same value in shared library ( wasRe: accept() hangs)
Re: socket() returning same value in shared library ( wasRe: accept() hangs)
- Subject: Re: socket() returning same value in shared library ( wasRe: accept() hangs)
- From: "Justin C. Walker" <email@hidden>
- Date: Mon, 10 Oct 2005 11:54:33 -0700
On Oct 10, 2005, at 11:29 , Ken Baer wrote:
I am porting a suite of WinSock based applications. We are using a
socket wrapper class that is in a shared Dynamic library. Right
now the server is running on a PC, but the Messenger and Slave are
running on a Mac (at the same time). The Messenger talks to the
server, and passes information back and forth between the Server
and the Slave. Messenger and Slave are sharing the same dynamic
library that makes all the calls to BSD socket functions.
I think the reason that the call to accept() called from the
Messenger is that the SOCKET value is the same from the listening
socket on the Messenger and the messenger socket that the Slave
tries to connect with. What's happening is that the BSD function
socket() is returning the same value (42) in the same dynamic
library when called from 2 different applications. They are booth
open.
Is there a way to insure that socket() returns a unique number in a
shared library environment?
I'm not sure I understand this. You initially said that your server
is hanging in accept(). Now, it sounds like the "Messenger", on a
different machine from the server, is doing an accept. Is that correct?
Can you be clearer about what processes (not threads) run where,
which process is hanging in accept(), and which processes are talking
to which?
Also, repeating my earlier request, what is an "Accept message"?
As indicated earlier in this thread, the value 42 may be a red herring.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
"Weaseling out of things is what separates us from the animals.
Well, except the weasel."
- Homer J Simpson
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden