Internet Direct (Indy)
Home
PreviousUpNext
TIdTCPClientCustom.ConnectAndGetAll Method

Opens a connection and reads all data.

Pascal
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.

TIdTCPClientCustom.Connect 

TIdTCPClientCustom.Host 

TIdTCPClientCustom.Port

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.