private void server_ConnectionRequested(object sender, NetSockConnectionRequestEventArgs e) { if (e.Client.Connected) { try {//取ip可能会报错 Logger.Log("Connection Requested: " + ((System.Net.IPEndPoint)e.Client.RemoteEndPoint).Address.ToString()); } catch (Exception) { } this.server.Accept(e.Client); } }
private void local_ConnectionRequested(object sender, NetSockConnectionRequestEventArgs e) { this.server.Accept(e.Client); }
private void server_ConnectionRequested(object sender, NetSockConnectionRequestEventArgs e) { this.Log("Connection Requested: " + ((System.Net.IPEndPoint)e.Client.RemoteEndPoint).Address.ToString()); this.Invoke(this.ConnectionRequested, sender, e); }