Minor Windows build fixes

This commit is contained in:
Joseph Henry
2021-03-19 22:57:21 -07:00
parent 3aa402582f
commit ea71b85627
2 changed files with 5 additions and 5 deletions

View File

@@ -292,7 +292,7 @@ namespace ZeroTier.Sockets
in4 = (zts_sockaddr_in)Marshal.PtrToStructure(remoteAddrPtr, typeof(zts_sockaddr_in));
// Convert sockaddr contents to IPEndPoint
IPAddress ipAddress = new IPAddress(in4.sin_addr);
IPEndPoint clientEndPoint = new IPEndPoint(ipAddress, IPAddress.NetworkToHostOrder(((ushort)in4.sin_port));
IPEndPoint clientEndPoint = new IPEndPoint(ipAddress, IPAddress.NetworkToHostOrder(((ushort)in4.sin_port)));
// Create new socket by providing file descriptor returned from zts_accept call.
Socket clientSocket = new Socket(
err, _socketFamily, _socketType, _socketProtocol, _localEndPoint, clientEndPoint);