summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d3d0974)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25128
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
ioctlsocket(sck->m_fd, FIONBIO, (u_long FAR *) &arg);
_GSocket_Enable_Events(sck);
ioctlsocket(sck->m_fd, FIONBIO, (u_long FAR *) &arg);
_GSocket_Enable_Events(sck);
+ /* allow a socket to re-bind if the socket is in the TIME_WAIT
+ state after being previously closed.
+ */
+ setsockopt(sck->m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(u_long));
+
/* Bind to the local address,
* retrieve the actual address bound,
* and listen up to 5 connections.
/* Bind to the local address,
* retrieve the actual address bound,
* and listen up to 5 connections.
#endif
_GSocket_Enable_Events(sck);
#endif
_GSocket_Enable_Events(sck);
+ /* allow a socket to re-bind if the socket is in the TIME_WAIT
+ state after being previously closed.
+ */
+ setsockopt(sck->m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(u_long));
+
/* Bind to the local address,
* retrieve the actual address bound,
* and listen up to 5 connections.
/* Bind to the local address,
* retrieve the actual address bound,
* and listen up to 5 connections.