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

OnRemoteReceive() protected method

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