[lkml]   [1996]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Problem with sockets

> won't let you bind to that address again because the socket is stuck in one of
> the terminal states (FIN1? 2? CLOSING? I forget...) for 60 (or is it 62?)
> after your app closes the socket. It makes debugging socket-based
> applications really annoying :)
> So what gives? Neither Solaris nor SunOS (the two other OSes I have to use at
> work) behave in this fashion...

They do. Timing patterns may make it seem otherwise.

You should add the following to your application

int one=1;
setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &one,sizeof(one));


 \ /
  Last update: 2005-03-22 13:38    [W:0.198 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site