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

Receiving (correctly) ConnectResponse from the correct address but wrong port will now mutate the connection to accept it; apparently some routers change outgoing port

This commit is contained in:
lidgren
2011-04-27 17:42:32 +00:00
parent bd58c6400d
commit b575f72186
2 changed files with 26 additions and 2 deletions

View File

@@ -89,6 +89,15 @@ namespace Lidgren.Network
m_currentMTU = m_peerConfiguration.MaximumTransmissionUnit;
}
/// <summary>
/// Change the internal endpoint to this new one. Used when, during handshake, a switch in port is detected (due to NAT)
/// </summary>
internal void MutateEndpoint(IPEndPoint endpoint)
{
m_remoteEndpoint = endpoint;
}
internal void SetStatus(NetConnectionStatus status, string reason)
{
// user or library thread