You've already forked lidgren-network-gen3
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user