Internet Direct (Indy) Version 9.0.1 Beta
|
TIdTCPServer = class(TIdComponent)
TIdTCPServer provides options that allow configuration of the server listener threads, including:
TIdTCPServer also provides properties and methods to control protocol specific options, including:
The TIdTCPServer architecture also implements two mechanisms for servicing peer connections. The first method uses event handlers that execute in the context of the threaded peer connection. The server implementation can assign procedures to the event handlers to respond to the following events:
The other method uses a collection of TIdCommandHandler objects to recognizing valid server commands, and provides methods and properties needed to handle parameters, perform actions, and formulate error and success responses. The properties and method realted to CommandHandler usgae include the following:
Server implementors can choose between using server-based event handlers and command handlers to provide finer control over the operation of the server and protocol.
TIdTCPServer can be used as a base class to create custom TCP server descendants that support specific protocols. Many of the Indy server components, such as TIdChargenServer, TIdDayTimeServer, TIdDICTServer, TIdEchoServer, TIdFingerServer, TIdGopherServer, TIdHostNameServer, TIdHTTPServer, TIdIRCServer, TIdNNTPServer, TIdQUOTDServer, TIdTelnetServer, and TIdWhoisServer, are descendants of the TIdTCPServer component.