Indy 9
TIdUDPClient
Hierarchy, Properties, Methods, Events, See Also, Unit: IdUDPClient
Implements a UDP client.
TIdUDPClient = class(TIdUDPBase)
Unit
IdUDPClient
Description
TIdUDPClient is a TIdUDPBase descendant that provides a client implementation of the User Datagram Protocol (UDP) as described in the Internet Standards document:

  • RFC 768 - User Datagram Protocol, RFC 768 (http://www.rfc-editor.org/rfc/rfc768.txt)

TIdUDPClient implements the Send method to transmit data to the remote computer system specified by Host and Port using the connection-less UDP protocol.

TIdUDPClient is used as an ancestor class for protocol implementations based on UDP. For example, TIdDNSResolver, TIdSNTP, and TIdTrivialFTP are descendants of TIdUDPClient.


TIdUDPClient.Host
TIdUDPClient
Identifies the address of the remote computer system.
property Host: string;
Description
Host is a String property used to identify the address of the remote computer system. Host and Port are used to build the UDP datagram packet, and identify the endpoint for the transmission.

Host can contain an IP address in dotted-decimal form, such as "129.71.2.4", or a computer name, such as "wvnvm.wvnet.edu". If the destination is also the machine where the UDP client is running, use "127.0.0.1" in Host.


TIdUDPClient.Port
TIdUDPClient
Identifies the port number on the remote system.
property Port: Integer;
Description
Port is an Integer property used to identify the port number on the remote computer system in Host. Host and Port are used to build the UDP datagram packet, and identify the endpoint for the transmission.

Some UDP-based protocols, such as SNTP (Simple Network Time Protocol) and DNS, used pre-defined port numbers. Port numbers below 1024 are reserved, but using a number above 1024 does not guarantee there will be no conflict.


TIdUDPClient.ReceiveTimeout
TIdUDPClient, See Also
Published time to wait for a readable socket binding.
property ReceiveTimeout: Integer;
Description
ReceiveTimeout is an Integer property that is published in TIdUDPClient. ReceiveTimeout is used like the TIdUDPBase.ReceiveTimeout property to specify the number of milliseconds to wait for a socket binding to become readable.

TIdUDPClient.Send
TIdUDPClient
Transmits data to the remote computer system.
procedure Send(AData: string); overload;
Parameters
AData: string
Values to sent to the remote computer system.
Description
Send is a procedure used to perform transmission of the data specified by AData to the computer system identified in the Host and the Port properties. TIdUDPBase also implements the Send method using the host name and port number specified in parameters.

TIdUDPClient.SendBuffer
TIdUDPClient
Sends a buffer containing data to the remote system.
procedure SendBuffer(var ABuffer; const AByteCount: integer); overload;
Parameters
var ABuffer
Buffer contain data to be sent to the remote connection.
const AByteCount: integer
Number of bytes in the buffer to be sent.
Description
SendBuffer is a procedure used to transmit the data in ABuffer to a remote system. AByteCount indicated the number of bytes from ABuffer to be sent to the remote system.

SendBuffer relies on the inherited SendBuffer method to transmit data to the remote host.


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