c - EADDRINUSE Address already in use avoidable? -
i testing socket class have written wraps linux socket api.
in test function following:
- create server socket
- bind/listen
- connect new socket
- accept on new socket
- send data between them recv , send.
- call shutdown(shut_wr) on both sides
- call recv on both sides, , 0 return value
- call close on 3 sockets
i repeat these 8 steps again.
i find intermittantly on bind
in second iteration of steps eaddrinuse.
i of impression possible perform orderly shutdown in such fashion avoidable. aware of so_reuseaddr
- possible orderly shutdown , block until port available again?
Comments
Post a Comment