Internet Direct (Indy)
Home
PreviousUpNext
TIdTCPConnection.CreateIOHandler Method

Creates the IOHandler for the connection.

Pascal
procedure CreateIOHandler(
    ABaseType: TIdIOHandlerClass = nil
);
Parameters 
Description 
ABaseType 
Class reference to use for creating the IOHandler for the connection. Default is nil. 

CreateIOHandler is a procedure used to create (or re-create) the IOHandler for the connection. If the connection is already Connected, an EIdException is raised. 

ABaseType is an optional Class reference to use when creating the IOHandler for the connection. The default is Nil, and indicates that the default IOHandler class is used to create the object instance. 

ManagedIOHandler is set to True to indicate that the IOhandler is managed by the object instance, as opposed to assigned by the application in code. 

When a new TIdIOHandler instance is assigned to the IOHandler property, an existing IOHandler will be freed when ManagedIOHandler contains True. IOHandler event handler properties are set to the OnWorkBegin, OnWork, and OnWorkEnd afor the connection object. 

If the new IOHandler is derived from TIdIOHandlerSocket, the value in Socket is updated to reflect the new IOHandler instance. In other words, both IOHandler and Socket may contain references to the new IOHandler

The current connection is added the free notification list for the IOHandler.

Exceptions 
Description 
With the RSIOHandlerCannotChange message. 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.