i have a problem. I run a TCP server in linux. I close the socket by close(socket) call. But when I try to rebind again, bind call fails with errno 98 => port is already binded. How should i unbind that socket?
Asked
Active
Viewed 1,238 times
2 Answers
2
You have to set SO_REUSEADDR option on the socket, see here.

Code Painters
- 7,175
- 2
- 31
- 47
-
Thank you, it really helped. Strange that it is not needed in Windows if I run the application there. – Erkil1452 May 06 '11 at 10:10