--- "dokapra" <> wrote:
> /* Enable address reuse. If previously interrupted in
> the middle of communication, tcp stack is in TIME_WAIT state.
> * This skips waiting for this timeout */
> on = 1;
> res = setsockopt(listenSocket, SOL_SOCKET, SO_REUSEADDR, &on,
> sizeof(on));
>
> if (bind(listenSocket, (struct sockaddr *) &serverAddress,
> sizeof(serverAddress)) < 0) {
> syslog(LOG_ERR,"cannot bind socket");
> exit(EXIT_FAILURE);
> }
Yeah, I'm employing REUSEADDR but the problem is
that I am relaunching a process that died and left
a previous bind()ing behind. When the process is
launched again, bind() fails because the TCP/IP
stack claims there's already a process listening
on that UDP port. REUSEADDR doesn't solve that
problem, alas. }:-}
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|