c***i 发帖数: 188 | 1 if i close 1 binded socket and immediately open it and rebind it.
if the socket still have data to send when being closed , i can not
rebind it immediately, i 've set the option SO_REUSEADDR but still
fail.
what's the best way to deal with such things, this happens when ur
server crashed and u want to restart it immiediately, right now
i just wait for the bind to succeed, but usually it will take about
1+ min.
PS: seems linux (redhat 6.2) do not support SO_REUSEPORT, and i'm using
TCP socket.
th |
|