IConnector Interface |
Namespace: FastProxy
public interface IConnector
The IConnector type exposes the following members.
The IConnector allows integration with a ProxyServer. The Connect(IPEndPoint, IListener) method is called whenever a new client is trying to connect.
On accepting a connection, the Connect method returns an endpoint and a listener. The endpoint is used to indicate the upstream endpoint to proxy the new client connection to. This can be used to e.g. implement a simple load balancer by returning a random endpoint from a list for every incoming connection.
The listener can be either a shared single one for all connections, or one local to a specific connection. This allows you to track state or configuration for a specific connection.