Indy 9
SendError
Unit: IdTrivialFTPBase
Build and send a UDP error message.
procedure SendError(UDPBase: TIdUDPBase; APeerIP: string; const APort: Integer; const ErrNumber: Word; ErrorString: string); overload;
procedure SendError(UDPClient: TIdUDPClient; const ErrNumber: Word; ErrorString: string); overload;
procedure SendError(UDPBase: TIdUDPBase; APeerIP: string; const APort: Integer; E: Exception); overload;
procedure SendError(UDPClient: TIdUDPClient; E: Exception); overload;
Unit
IdTrivialFTPBase
Parameters
UDPBase: TIdUDPBase
UDP descendant generating the exception.
APeerIP: string
IP address of the peer connection.
const APort: Integer
Port number of the peer connection.
const ErrNumber: Word
Error number for the message.
ErrorString: string
Error text for the message.
UDPClient: TIdUDPClient
UDP client generating the exception.
E: Exception
Exception which should be written in the message.
Description
SendError is an overloaded method used to construct and send UDP protocol error messages. A UDP error message normally contains the error number and text as specified in ErrNumber and ErrorString.

When the Exception variant is used, the text of the error message will contain Exception.Message.

When the TIdUDPClient variant is used, the Host and Port properties of UDPClient are used to send the error message.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.