static private IsLocalIpAddress ( |
||
remoteAddress | ||
Результат | bool |
} // ReleaseControl // Determines if the remote connection is from localhost. internal bool IsLocalhost() { if (NetSocket == null || NetSocket.RemoteEndPoint == null) { return(true); } IPAddress remoteAddr = ((IPEndPoint)NetSocket.RemoteEndPoint).Address; return(IPAddress.IsLoopback(remoteAddr) || CoreChannel.IsLocalIpAddress(remoteAddr)); } // IsLocalhost
internal bool IsLocalhost() { if ((this.NetSocket != null) && (this.NetSocket.RemoteEndPoint != null)) { IPAddress address = ((IPEndPoint)this.NetSocket.RemoteEndPoint).Address; if (!IPAddress.IsLoopback(address)) { return(CoreChannel.IsLocalIpAddress(address)); } } return(true); }