Topic Path: Symbol Reference > Classes > TIdDICT Class > TIdDICT Methods > Connect Method
ContentsIndexHome
PreviousUpNext
TIdDICT.Connect Method

Establishes the connection to the DICT server.

procedure Connect; override;

Connect is an overridden method in TIdDICT that establishes the connection to the DICT server indicated using the Host and Port properties. 

Connect clears the Capabilities and Server properties prior to calling the inherited Connect method to open the client connection to the server. If the connection is successful, as indicated by the numeric response code 220, value are parsed from the server greeting and stored in the Server and Capabilities properties. 

Connect sends the DICT CLIENT command using the value in the Client property to provide information about the client to the DICT server. 

Connect performs authentication for the client based on the value of the AuthType property and the Capabilities supported on the DICT server. When AuthType contains atDefault, the DICT AUTH command is used with the values in Username and Password to perform authentication using an MD5 hash value. When AuthType contains atSASL, the SASLMechanisms for the client are used to perform authentication. 

Connect sends the DICT OPTION MIME command when "MIME" is included in the Capabilities supported on the DICT server. 

If an exception is encountered during processing in the Connect method, the Disconnect method is called to close the connection to the DICT server.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.