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

StartRelay() public method

Starts relaying data between the remote host and the local client.
This method should only be called after all protocol specific communication has been finished.
public StartRelay ( ) : void
return void
        public void StartRelay()
        {
            try {
            ClientSocket.BeginReceive(Buffer, 0, Buffer.Length, SocketFlags.None, new AsyncCallback(this.OnClientReceive), ClientSocket);
            DestinationSocket.BeginReceive(RemoteBuffer, 0, RemoteBuffer.Length, SocketFlags.None, new AsyncCallback(this.OnRemoteReceive), DestinationSocket);
            } catch {
            Dispose();
            }
        }