Subject: | |
From: | |
Reply To: | |
Date: | Wed, 4 Sep 1996 22:45:47 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Randy Medd ([log in to unmask]) wrote:
: All:
: Does anyone know if there's a NetIPC intrinsic mechanism to set the
: "re-use address" option available via setsockopt(...SO_REUSEADDR...)
: under BSD?
: I'm trying to find a way to avoid the:
: ADDRESS CURRENTLY IN USE BY ANOTHER SOCKET. (SOCKERR 106)
: error - something other than "try again", that is.
Wow, talk about synchonicity. I worked around the sockets
problem I posted yesterday (or was it two days ago?). Turns
out that MPE is erroneously reporting ENOENT when an accept()
is done on a socket with O_NONBLOCK set, and no connections
are pending. So the workaround is to loop when ENOENT is
returned just as if EAGAIN (the correct status) had been
returned.
Anyway, one of the things I ran across in tracking this down
was a call to setsockopt with SO_REUSEADDR. In typical UNIX
fashion, the return status wasn't being checked on the call,
so only by checking the documentation did I notice that the
call is unsupported and presumably failing. So I commented
out the code, with no apparent ill effects.
So I'm reading news in one window, with a socket test running
in another window, when I see Randy's message. I flip back
to the window with the socket test to see "Exception while
listening for connections: Bad address" returned after one
connection completes and the program attempts to reuse that
socket.
A very long-winded way of saying I'm also interested in the
answer to this question.
Mike
-----------------------------------------------------------------
Mike Yawn email [log in to unmask]
Hewlett-Packard HPDesk Mike YAWN/HP6650/21
Commercial Systems Division Voice (408) 447-4367
19447 Pruneridge Ave M/S 47UA Fax (408) 447-4441
Cupertino, CA 95014
-----------------------------------------------------------------
|
|
|