Internet Direct (Indy) Version 9.0.1 Beta
TIdTCPConnection.IOHandler
Provides an abstract input/output source for send and receive operations.

property IOHandler: TIdIOHandler;
Description
IOHandler is a TIdIOHandler property that indicates the class to be used to provide input and output sources for the connection. IOHandler, and descendant classes, allow abstraction of send and receive operations using Socket connections, streams, or any input/output source where an IOHandler has been written. The default IOHandler in Indy is the socket-based TIdIOHandlerSocket.

IOHandler is used in methods that perform low-level read or write operations like ReadFromStack and WriteBuffer. IOHandler is also used in methods that access the connection status like CheckForDisconnect, Connected, DisconnectSocket, and Disconnect.

When accessing IOHandler in application code, always cast the IOHandler to the correct descendant class. This is needed to access any methods or properties in the descendant that cannot be represented in the ancestor class at runtime.