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

GetConnection() added

This commit is contained in:
lidgren
2010-07-07 16:41:25 +00:00
parent fa69daebbb
commit 7cfdc0a218

View File

@@ -104,6 +104,17 @@ namespace Lidgren.Network
m_statistics = new NetPeerStatistics(this);
}
/// <summary>
/// Returns the connection to a remote endpoint; if it exists
/// </summary>
public NetConnection GetConnection(IPEndPoint remoteEndPoint)
{
NetConnection retval;
if (m_connectionLookup.TryGetValue(remoteEndPoint, out retval))
return retval;
return null;
}
/// <summary>
/// Binds to socket
/// </summary>