Internet Direct (Indy) Version 9.0.1 Beta
TIdTCPConnection.SendCmd
Sends a command to the peer.

function SendCmd(const AOut: string; const AResponse: SmallInt): SmallInt; overload;
function SendCmd(const AOut: string; const AResponse: Array of SmallInt): SmallInt; virtual; overload;
Parameters
const AOut: string
Command to be sent to the server.

const AResponse: Array of SmallInt
Numeric response expected. Default is -1. (Array of SmallInt for multiple responses allowed).

Description
SendCmd sends the command specified in AOut to the peer. If the numeric response code is not AResponse, an exception is raised. If you have to check for more than one numeric response number code, pass an array of numbers in AResponse. If you do not want an exception raised, omit AResponse.