static private GetMachineAddress ( |
||
host | ||
addressFamily | AddressFamily | |
리턴 |
internal RemoteConnection(SocketCache socketCache, String machineAndPort) { _socketCache = socketCache; _cachedSocketList = new CachedSocketList(); // parse "machinename:port" String[] parts = machineAndPort.Split(colonSep); String machineName = parts[0]; int port = Convert.ToInt32(parts[1]); _machineAndPort = machineAndPort; IPAddress addr = null; // we'll just let the exception bubble up if the machineName cannot // be resolved. IPHostEntry ipEntries = Dns.Resolve(machineName); addr = CoreChannel.GetMachineAddress(ipEntries, AddressFamily.InterNetwork); _ipEndPoint = new IPEndPoint(addr, port); } // RemoteConnection