Inheritance: System.EventArgs
Beispiel #1
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     if (disconnected) return;
     //Console.WriteLine("Client DC'd");
     disconnected = true;
     RemoteClient.Disconnect();
 }
Beispiel #2
0
        void _server_onClientConnected(object sender, ClientEventArgs e)
        {
            //Console.WriteLine("Client connected.");
            SocksClient client = new SocksClient(e.Client);
	    client.onClientConnected += client_onClientConnected;
            client.onClientDisconnected += client_onClientDisconnected;
            client.OnClientAuthenticating += client_OnClientAuthenticating;
            Clients.Add(client);
            client.Authentication = this.Authentication;
            client.Begin(this.PacketSize, this.Timeout);
        }
Beispiel #3
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     this.OnDisconnected(this, new Socks5ClientArgs(this, SocksError.Expired));
 }
Beispiel #4
0
 void RemoteClient_onClientDisconnected(object sender, ClientEventArgs e)
 {
     Client.Client.Disconnect();
     Client.Client.onDataReceived -= Client_onDataReceived;
 }
Beispiel #5
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     this.onClientDisconnected(this, new SocksClientEventArgs(this));
     Client.onClientDisconnected -= Client_onClientDisconnected;
     //added to clear up memory
 }
Beispiel #6
0
 void RemoteClient_onClientDisconnected(object sender, ClientEventArgs e)
 {
     #if DEBUG
     Console.WriteLine("Remote DC'd");
     #endif
     if (disconnected) return;
     //Console.WriteLine("Remote DC'd");
     disconnected = true;
     Client.Client.Disconnect();
     Client.Client.onDataReceived -= Client_onDataReceived;
     Client.Client.onClientDisconnected -= Client_onClientDisconnected;
 }
Beispiel #7
0
 void _server_onClientConnected(object sender, ClientEventArgs e)
 {
     //Console.WriteLine("Client connected.");
     //call plugins related to ClientConnectedHandler.
     foreach (ClientConnectedHandler cch in PluginLoader.LoadPlugin(typeof(ClientConnectedHandler)))
     {
         try
         {
             if (!cch.OnConnect(e.Client, (IPEndPoint)e.Client.Sock.RemoteEndPoint))
             {
                 e.Client.Disconnect();
                 return;
             }
         }
         catch
         {
         }
     }
     SocksClient client = new SocksClient(e.Client);
     e.Client.onDataReceived += Client_onDataReceived;
     e.Client.onDataSent += Client_onDataSent;
     client.onClientDisconnected += client_onClientDisconnected;
     Clients.Add(client);
     client.Begin(this.OutboundIPAddress, this.PacketSize, this.Timeout);
 }
Beispiel #8
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     this.onClientDisconnected(this, new SocksClientEventArgs(this));
 }
Beispiel #9
0
 void RemoteClient_onClientDisconnected(object sender, ClientEventArgs e)
 {
     #if DEBUG
     Console.WriteLine("Remote DC'd");
     #endif
        /* if (disconnected) return;
     disconnected = true;
     //Client.Client.Disconnect();
     disconnected = true;*/
 }
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     if (disconnected) return;
     disconnected = true;
     RemoteClient.Disconnect();
 }
Beispiel #11
0
 void RemoteClient_onClientDisconnected(object sender, ClientEventArgs e)
 {
     Client.Client.Disconnect();
 }