Topic Path: Symbol Reference > Classes > TIdTCPConnection Class > TIdTCPConnection Methods > SendCmd Method > SendCmd Method (string, array of SmallInt)
ContentsIndexHome
PreviousUpNext
TIdTCPConnection.SendCmd Method (string, array of SmallInt)

Sends a command to the peer connection.

function SendCmd(
    AOut: string; 
    const AResponse: array of SmallInt
): SmallInt; virtual; overload;
Parameters 
Description 
AOut 
Command to be sent to the server.
 
AResponses 
Responses expected. 

SmallInt - Response for the command.

SendCmd is an overloaded function used to send the command specified in AOut to the peer connection. 

SendCmd uses IOHandler to write the command in AOut to the peer connection. 

AResponses indicates the responses allowed for the command. 

SendCmd calls GetResponse to determine if the response from the peer connection is allowed. If the response is not allowed, an exception is raised during processing in GetResponse

The values in AResponses are used to valid the response code. 

Use LastCmdResult to access the numeric and text portions of the response for the command.

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