API Reference
Class
NtpClient
Minimal NTP (RFC 5905) UDP payload client used for lightweight health checks.
Inheritance
- Object
- NtpClient
Methods
public static async Task<NtpPayloadResult> QueryAsync(String server, Int32 timeoutMs = 2000, Int32 port = 123, CancellationToken cancellationToken = null) #Returns:
Task<NtpPayloadResult>Sends an NTP request to the specified server and parses the response.
Parameters
- server System.String
- Hostname or IP address.
- timeoutMs System.Int32 = 2000
- Receive timeout in milliseconds.
- port System.Int32 = 123
- UDP port (default 123).
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.