Indy 9
TIdDayTimeUDP
Hierarchy, Properties, Methods, Events, See Also, Unit: IdDayTimeUDP
Implements a UDP-based DayTime protocol client.
TIdDayTimeUDP = class(TIdUDPClient)
Unit
IdDayTimeUDP
Description
TIdDayTime implements a UDP-based variant of the DayTime protocol (RFC 867) as a client. In this protocol, a DayTime server sends the current day and time in a human readable format and is sometimes used for debugging.

If you need a time-synchronization solution, we recommend that you use the Time protocol encapsulated by TIdTime, TIdTimeUDP, TIdTimeServer, and TIdTimeUDPServer.


TIdDayTimeUDP.DayTimeStr
TIdDayTimeUDP
Retrieves the Date and Time from a server.
property DayTimeStr: String;
Description
DayTimeStr is a String property that cause the component to connect to the Host server and retrieve the date and time. Since this can be returned in a free-form format, this is not converted to a TDateTime and there is no time synchronization performed.

You must set the Host property to the DayTime server before using this property.


TIdDayTimeUDP.Port
TIdDayTimeUDP, See Also
Specifies the port number used by the DayTime protocol.
property Port: Integer;
Description
Port is an Integer property and is redefined in TIdDayTime to specify the default value used by the DayTime protocol. (IdPORT_DAYTIME). The default value for Port is assigned in the Create constructor. Port is used when accessing the value in DayTimeStr, and a datagram is used to retrieve the property value from the DayTime server.

TIdDayTimeUDP.Create
TIdDayTimeUDP, See Also
Constructor for the object instance.
constructor Create(AOwner: TComponent); override;
Parameters
AOwner: TComponent
Owner of the object instance.
Description
Create is the constructor for the object instance, and calls the inherited Create constructor. Create initializes Port to the constant value IdPORT_DAYTIME as required by the DayTime Protocol.

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