Internet Direct (Indy) Version 9.0.2 Beta
TIdNNTP.SendCmd
Performs NNTP commands.

function SendCmd(const AOut: string; const AResponse: Array of SmallInt): SmallInt; override;
Parameters
const AOut: string
NNTP command to be executed.

const AResponse: Array of SmallInt
Array of anticipated numeric response codes. An empty array ([]) indicates that no response code is expected.

Returns
SmallInt - Response code returned from either the NNTP send command.

Description
SendCmd is based on the functionality in the inherited method TIdTCPConnection.SendCmd and is overridden in TIdNNTP to provide additional capabilities.

SendCmd will perform User and Password authentication when the response code returned by TIdTCPConnection.SendCmd is either 450 or 480. Refer to Common NNTP Extensions for more information on NNTP response codes.

SendCmd performs default error handling by calling CheckResponse. An EIDResponseError exception will be raised when a valid response is expected and the result, from either the inherited SendCmd or from the authentication of User and Password information, does not match the expected response code(s).