Inheritance: System.EventArgs
Esempio n. 1
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     if (disconnected) return;
     //Console.WriteLine("Client DC'd");
     disconnected = true;
     RemoteClient.Disconnect();
 }
Esempio n. 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);
        }
Esempio n. 3
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     this.OnDisconnected(this, new Socks5ClientArgs(this, SocksError.Expired));
 }
Esempio n. 4
0
 void RemoteClient_onClientDisconnected(object sender, ClientEventArgs e)
 {
     Client.Client.Disconnect();
     Client.Client.onDataReceived -= Client_onDataReceived;
 }
Esempio n. 5
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     this.onClientDisconnected(this, new SocksClientEventArgs(this));
     Client.onClientDisconnected -= Client_onClientDisconnected;
     //added to clear up memory
 }
Esempio n. 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;
 }
Esempio n. 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);
 }
Esempio n. 8
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     this.onClientDisconnected(this, new SocksClientEventArgs(this));
 }
Esempio n. 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;*/
 }
Esempio n. 10
0
 void Client_onClientDisconnected(object sender, ClientEventArgs e)
 {
     if (disconnected) return;
     disconnected = true;
     RemoteClient.Disconnect();
 }
Esempio n. 11
0
 void RemoteClient_onClientDisconnected(object sender, ClientEventArgs e)
 {
     Client.Client.Disconnect();
 }