C# Class NRepeat.TcpProxy

Inheritance: IProxy
Mostrar archivo Open project: jeremychild/NRepeat

Public Methods

Method Description
Start ( ) : void

Start the TCP Proxy

Stop ( ) : void

Stop the Proxy Server

TcpProxy ( ProxyDefinition definition ) : System
TcpProxy ( short port ) : System
TcpProxy ( short port, IPAddress ipAddress ) : System
TcpProxy ( short port, IPAddress ipAddress, int buffer ) : System

Private Methods

Method Description
AcceptConnections ( ) : Task

Accept Connections

ProxyClientConnection ( TcpClient client, int bufferSize ) : Task

Process the client with a predetermined buffer size

ProxyClientDataToServer ( TcpClient client, NetworkStream serverStream, NetworkStream clientStream, int bufferSize, CancellationToken cancellationToken ) : void

Send and receive data between the Client and Server

ProxyServerDataToClient ( NetworkStream serverStream, NetworkStream clientStream, int bufferSize, CancellationToken cancellationToken ) : void

Send and receive data between the Server and Client

Method Details

Start() public method

Start the TCP Proxy
public Start ( ) : void
return void

Stop() public method

Stop the Proxy Server
public Stop ( ) : void
return void

TcpProxy() public method

public TcpProxy ( ProxyDefinition definition ) : System
definition ProxyDefinition
return System

TcpProxy() public method

public TcpProxy ( short port ) : System
port short
return System

TcpProxy() public method

public TcpProxy ( short port, IPAddress ipAddress ) : System
port short
ipAddress System.Net.IPAddress
return System

TcpProxy() public method

public TcpProxy ( short port, IPAddress ipAddress, int buffer ) : System
port short
ipAddress System.Net.IPAddress
buffer int
return System