Indy 9
|
TIdServerIntercept = class(TIdBaseComponent)
TIdConnectionIntercept descendants will be used by peer connection to act as an intermediary between the socket binding for the connection and low-level operations that communicate with the protocol stack.
TIdServerIntercept provides virtual methods to initialize the server socket handler, and to provide new TIdConnectionIntercept handlers for peer connections when the connection is accepted.
Call Init to perform initialization tasks prior to using the TIdServerIntercept instance to accepting connections. Call Accept to create the TIdConnectionIntercept handler used by the peer connection.
Note: Do not create instances of TIdServerIntercept. Use descendant classes, like TIdServerInterceptOpenSSL, or create custom descendants that implement the virtual methods of TIdServerIntercept.
function Accept(AConnection: TComponent): TIdConnectionIntercept; virtual; abstract;
Return Values:
ABinding is the socket handle used to communicate with the peer connection.
Descendant of TIdServerIntercept must implement the abstract Accept method to provide the TIdConnectionIntercept descendant that is appropriate for the TIdServerIntercept.
procedure Init; virtual; abstract;
For example, TIdServerInterceptOpenSSL implements Init to load the SSL (Secure SOcket Layer) context needed to access the Root Certificate, the Certificate file, and the Key file needed to authorize SSL peer connections.