Internet Direct (Indy) Version 9.0.1 Beta
TIdConnectionIntercept
Specifies a socket handling framework that performs state change and data transformation tasks.

TIdConnectionIntercept = class(TIdBaseComponent)
Description
TIdConnectionIntercept is an abstract class that implements a generic framework for servicing sockets during operations that affect the state of the connection, or perform input and output over the socket binding.

TIdConnectionIntercept descendants can be used by TIdTCPConnection and descendants to act as an intermediary between the socket binding for the connection and low-level operations that communicate with the protocol stack.

TIdConnectionIntercept provides virtual methods to respond to Connect and Disconnect requests for a socket binding by capturing or releasing a reference to the TIdSocketHandle used by the protocol stack.

The socket handle will be used to access data before messages are sent and/or after responses are received. Developers can use TIdConnectionIntercept descendants to encrypt and decrypt data, or to compress and decompress messages.

Additional virtual methods can be used to perform the Send or Recv operation in behalf of the original socket connection. TIdConnectionIntercept can also allow the socket connection to complete the input/output operation by changing the SendHandling and ReceiveHandling properties.

Note: Do not create instances of TIdConnectionIntercept. Use descendant classes, like TIdConnectionInterceptOpenSSL or TIdLogDebug, or create custom descendants that implement the virtual methods of TIdConnectionIntercept.