void _server_onClientConnected(object sender, ClientEventArgs e) { Console.WriteLine("Client connected."); SocksClient client = new SocksClient(e.Client); client.onClientDisconnected += client_onClientDisconnected; client.OnClientAuthenticating += client_OnClientAuthenticating; Clients.Add(client); client.Authentication = this.Authentication; client.Begin(this.PacketSize, this.Timeout); }
void Client_onClientDisconnected(object sender, ClientEventArgs e) { this.onClientDisconnected(this, new SocksClientEventArgs(this)); }
void RemoteClient_onClientDisconnected(object sender, ClientEventArgs e) { Client.Client.Disconnect(); }