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

Changed all Endpoint to EndPoint for consistency

This commit is contained in:
lidgren
2012-07-06 21:28:13 +00:00
parent b49392182b
commit 1ecf9fd8b8
19 changed files with 101 additions and 102 deletions

View File

@@ -240,29 +240,29 @@ namespace Lidgren.Network
/// <summary>
/// Create a connection to a remote endpoint
/// </summary>
public NetConnection Connect(IPEndPoint remoteEndpoint)
public NetConnection Connect(IPEndPoint remoteEndPoint)
{
return Connect(remoteEndpoint, null);
return Connect(remoteEndPoint, null);
}
/// <summary>
/// Create a connection to a remote endpoint
/// </summary>
public virtual NetConnection Connect(IPEndPoint remoteEndpoint, NetOutgoingMessage hailMessage)
public virtual NetConnection Connect(IPEndPoint remoteEndPoint, NetOutgoingMessage hailMessage)
{
if (remoteEndpoint == null)
throw new ArgumentNullException("remoteEndpoint");
if (remoteEndPoint == null)
throw new ArgumentNullException("remoteEndPoint");
lock (m_connections)
{
if (m_status == NetPeerStatus.NotRunning)
throw new NetException("Must call Start() first");
if (m_connectionLookup.ContainsKey(remoteEndpoint))
if (m_connectionLookup.ContainsKey(remoteEndPoint))
throw new NetException("Already connected to that endpoint!");
NetConnection hs;
if (m_handshakes.TryGetValue(remoteEndpoint, out hs))
if (m_handshakes.TryGetValue(remoteEndPoint, out hs))
{
// already trying to connect to that endpoint; make another try
switch (hs.m_status)
@@ -283,7 +283,7 @@ namespace Lidgren.Network
return hs;
}
NetConnection conn = new NetConnection(this, remoteEndpoint);
NetConnection conn = new NetConnection(this, remoteEndPoint);
conn.m_status = NetConnectionStatus.InitiatedConnect;
conn.m_localHailMessage = hailMessage;
@@ -291,7 +291,7 @@ namespace Lidgren.Network
conn.m_connectRequested = true;
conn.m_connectionInitiator = true;
m_handshakes.Add(remoteEndpoint, conn);
m_handshakes.Add(remoteEndPoint, conn);
return conn;
}