IListener Interface |
Namespace: FastProxy
public interface IListener : IDisposable
The IListener type exposes the following members.
Name | Description | |
---|---|---|
Closed |
Called when the connection has been closed.
| |
DataReceived |
Called when bytes have been received from either the server or the
client.
| |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) |
The IListener interface allows you to integrate with ProxyServer.
The DataReceived(Int32, Direction) method is called whenever data is received from the server of the client. The return value of this method can be used to force a connect to be closed. This feature is e.g. used in ChaosConnector to randomly close connections.
Implementations of this interface are provided to ProxyServer through an IConnector implementation. This allows you to have different IListener instances per connection.