1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 15:16:33 +09:00

Can configure to be dual-mode, or plain IPv4/6

This commit is contained in:
CallumDev
2019-06-10 02:28:38 +09:30
parent 1a2301ddbc
commit 85ad100f89
4 changed files with 27 additions and 8 deletions

View File

@@ -153,7 +153,7 @@ namespace Lidgren.Network
targetCopy.Port = target.Port;
m_socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true);
}
else
else if(m_configuration.DualStack && m_configuration.LocalAddress.AddressFamily == AddressFamily.InterNetworkV6)
NetUtility.CopyEndpoint(target, targetCopy); //Maps to IPv6 for Dual Mode
int bytesSent = m_socket.SendTo(data, 0, numBytes, SocketFlags.None, targetCopy);