Internet Direct (Indy)
Home
PreviousUpNext
TIdNNTP.SendCmd Method

Executes NNTP commands verbs.

Pascal
function SendCmd(
    AOut: string; 
    const AResponse: array of SmallInt
): SmallInt; override;
Parameters 
Description 
AOut 
NNTP command to be executed.
 
AResponse 
Array of anticipated numeric response codes. An empty array ([]) indicates that no response code is expected. 

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

SendCmd is an overriden SmallInt function in TIdNNTP. SendCmd calls the inherited SendCmd method using an empty array indicating no expected response codes. 

SendCmd extends the ancestor method by implementing User and Password authentication using the NNTP AUTHINFO service extension when the response code returned by TIdTCPConnection.SendCmd is either 450 or 480, as described in the Internet Standards document: 

RFC 2980 - Common NNTP Extensions  

When either of these responses is encountered, SendCmd sends additional NNTP AUTHINFO commands to the server to perform client authentication using the values in Username and Password

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

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.