Org.Mentalis.Proxy.Client.OnClientReceive C# (CSharp) Method

OnClientReceive() protected method

Called when we have received data from the local client.
Incoming data will immediately be forwarded to the remote host.
protected OnClientReceive ( IAsyncResult ar ) : void
ar IAsyncResult The result of the asynchronous operation.
return void
        protected void OnClientReceive(IAsyncResult ar)
        {
            try {
            int Ret = ClientSocket.EndReceive(ar);
            if (Ret <= 0) {
                Dispose();
                return;
            }
            DestinationSocket.BeginSend(Buffer, 0, Ret, SocketFlags.None, new AsyncCallback(this.OnRemoteSent), DestinationSocket);
            } catch {
            Dispose();
            }
        }