Ntp Class
Namespace: Rebex.Net
Assembly: Rebex.Time.dll (version 7.0.9048)
Provides methods for communication with NTP servers. Supported protocol versions are 3 and 4.
Syntax
public class Ntp : TimeBase
Inherited Members
Constructors
Name | Description |
---|---|
Ntp(String) | Creates an instance of Ntp class and binds it to the specified NTP time server. |
Ntp(String, Int32) | Creates an instance of Ntp class and binds it to the specified NTP time server. |
Fields
Name | Description |
---|---|
DefaultPort | Default NTP port number (123). |
Properties
Name | Description |
---|---|
SkipStratumCheck | Gets or sets a value indicating whether the stratum value returned by the server is checked for a value indicating a Kiss-of-Death (error) packet (default is to perform check). |
Timeout | Gets or sets the length of time in milliseconds before the operation times out (specify -1 or 0 to indicate that the request does not time out). Inherited from TimeBase. |
VersionNumber | NTP/SNTP protocol version number. |
Methods
Name | Description |
---|---|
GetTime() | Sends a request for time to the NTP server passed to the constructor and waits for the answer that contains the time values to calculate the offset between the local and server time. |
GetTimeAsync(Object) | Begins asynchronous GetTime operation. Sends a request for time to the NTP server passed to the constructor and waits for the answer that contains the time values to calculate the offset between the local and server time. |
SynchronizeSystemClock() | Synchronize the local time with the server. Inherited from TimeBase. |
SynchronizeSystemClock(String) | Synchronize the local time with the NTP server. |
SynchronizeSystemClock(String, Int32) | Synchronize the local time with the NTP server. |
SynchronizeSystemClockAsync(Object) | Begins asynchronous SynchronizeSystemClock operation. Synchronize the local time with the server. Inherited from TimeBase. |