Topic Path: Symbol Reference > Classes > TIdTCPClientCustom Class > TIdTCPClientCustom Methods > ConnectAndGetAll Method
TIdTCPClientCustom.ConnectAndGetAll Method

Opens a connection and reads all data.

function ConnectAndGetAll: string; virtual;

string - Values read from the connection.

ConnectAndGetAll is a string function used to open a connection, read available data, and close the connection in a single method call. 

ConnectAndGetAll calls Connect using the values in the Host and Port properties to open the client connection. 

ConnectAndGetAll uses the AllData method in the IOHandler to read any available data from the connection until it is closed by the peer. 

The return value for the method is the string containing values read from the IOHandler

ConnectAndGetAll calls Disconnect prior to exiting from the method. 

Make sure that the protocol you are using behaves in the manner expected before using ConnectAndGetAll. Quote of the Day and DayTime are examples of protocols where ConnectAndGetAll is supported.




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