X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37340c48fbdbd2e2aadfe371b504cea700816a83..154fd1e4735bde68600b1901ddb3668d67216de0:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 848e383c4b..8edfe18588 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -1068,6 +1068,11 @@ wxSocketServer::wxSocketServer(wxSockAddress& addr_man, // Setup the socket as server GSocket_SetLocal(m_socket, addr_man.GetAddress()); + + if (GetFlags() & wxSOCKET_REUSEADDR) { + GSocket_SetReusable(m_socket); + } + if (GSocket_SetServer(m_socket) != GSOCK_NOERROR) { GSocket_destroy(m_socket); @@ -1262,7 +1267,6 @@ wxDatagramSocket::wxDatagramSocket( wxSockAddress& addr, return; } // Setup the socket as non connection oriented - GSocket_Unstreamed(m_socket); GSocket_SetLocal(m_socket, addr.GetAddress()); if( GSocket_SetNonOriented(m_socket) != GSOCK_NOERROR ) {