Internet Direct (Indy) Version 9.0.2 Beta
TIdTCPServer.Intercept
Identifies the socket data handler.

property Intercept: TIdServerIntercept;
Description
Intercept is a TIdServerIntercept property that implements support for detecting when data is sent or data is received using a socket connection. Intercept provides an extensible mechanism to manipulate the socket connection or the data sent and received over the connection prior to use by a client.

Intercept allows a developer to create TIdIntercept descendants to encrypt and decrypt data or to compress and decompress messages. One common use of TIdIntercept is to provide support for the Secure Socket Layer (SSL) protocol, using a TIdServerInterceptOpenSSL instance, in TIdTCPServer and descendants.

Intercept is used by TIdListenerThread to insure that the peer TIdTCPServerConnection receives an appropriate socket handle binding from Intercept.Accept. The peer connection should receive a TIdConnectionIntercept descendant appropriate to the TIdServerIntercept that accepts the connection, or the socket connection will not be able to communicate properly.