public void StartDaemon() { var remoteEndPoint = _client.RemoteEndPoint as IPEndPoint; _clientInfo.Options.RemoteAddr = remoteEndPoint.Address.ToString(); _clientInfo.Options.RemoteHost = Dns.GetHostEntry(remoteEndPoint.Address).HostName; Daemon.StartDaemon(_clientInfo); _client.Close(); _clientSockets.Remove(this); }
public void StartDaemon() { string remoteAddr = Client.RemoteEndPoint.ToString(); remoteAddr = remoteAddr.Substring(0, remoteAddr.IndexOf(':')); //string remoteHost = Dns.GetHostByAddress(IPAddress.Parse(remoteAddr)).HostName; string remoteHost = Dns.GetHostEntry(IPAddress.Parse(remoteAddr)).HostName; ClientInfo.Options.remoteAddr = remoteAddr; ClientInfo.Options.remoteHost = remoteHost; Daemon.StartDaemon(ClientInfo); Client.Close(); ClientSockets.Remove(this); }