Tap now basically sorta works on Windows. Now have to figure out how to control DHCP behavior since we normally don't want that.

This commit is contained in:
Adam Ierymenko
2013-08-27 11:15:14 -04:00
parent 335733f110
commit b4be07149f
2 changed files with 28 additions and 7 deletions

View File

@ -167,14 +167,15 @@ UdpSocket::UdpSocket(
UdpSocket::~UdpSocket()
{
int s = _sock;
#ifdef __WINDOWS__
SOCKET s = _sock;
_sock = INVALID_SOCKET;
if (s != INVALID_SOCKET) {
::shutdown(s,SD_BOTH);
::closesocket(s);
}
#else
int s = _sock;
_sock = 0;
if (s > 0) {
::shutdown(s,SHUT_RDWR);