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

host port switch support for handshake begun

This commit is contained in:
lidgren
2011-04-25 21:38:23 +00:00
parent 814cd1507d
commit bd58c6400d

View File

@@ -455,6 +455,22 @@ namespace Lidgren.Network
case NetMessageType.NatPunchMessage:
HandleNatPunch(ptr, senderEndpoint);
return;
case NetMessageType.ConnectResponse:
lock (m_handshakes)
{
foreach (var hs in m_handshakes)
{
if (hs.Key.Address.Equals(senderEndpoint.Address))
{
LogWarning("Detected possible host port switch! TODO: Create new connection and continue handshake");
return;
}
}
}
LogWarning("Received unhandled library message " + tp + " from " + senderEndpoint);
return;
case NetMessageType.Connect:
// proceed
break;