Click or drag to resize

IConnector Interface

Provides an interface for accepting incoming connections in a ProxyServer.

Namespace:  FastProxy
Assembly:  FastProxy (in FastProxy.dll) Version: 0.2.0.0
Syntax
C#
public interface IConnector

The IConnector type exposes the following members.

Methods
  NameDescription
Public methodConnect
Called when a new client tries to connect.
Top
Remarks

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.

See Also