updated a few places to use NetState.Address rather than Socket.RemoteEndPoint.Address
added Utility.Intern(IPAddress) and implemented where appropriate
This commit is contained in:
parent
442b48d406
commit
e15ed963d8
9 changed files with 29 additions and 43 deletions
|
|
@ -74,9 +74,7 @@ namespace Server.Misc
|
|||
|
||||
private static bool IsLocalMachine( NetState state )
|
||||
{
|
||||
Socket sock = state.Socket;
|
||||
|
||||
IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;
|
||||
IPAddress theirAddress = state.Address;
|
||||
|
||||
if ( IPAddress.IsLoopback( theirAddress ) )
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ namespace Server.Misc
|
|||
m_Voters = new IPAddress[reader.ReadInt()];
|
||||
|
||||
for ( int i = 0; i < m_Voters.Length; ++i )
|
||||
m_Voters[i] = reader.ReadIPAddress();
|
||||
m_Voters[i] = Utility.Intern( reader.ReadIPAddress() );
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue