NtpResponse Class
Represents the response from an NTP server query.
public sealed class NtpResponseProperties
| Name | Description |
|---|---|
| ClockOffset | Gets the estimated clock offset between the client and the server. |
| DestinationTimestamp | Gets the local time at which the reply was received by the client. |
| IsKissOfDeath | Gets a value indicating whether this is a Kiss-o'-Death packet: the server is refusing service and its timestamps carry no time. NtpResponse.KissCode says why. |
| KissCode | Gets the four-character Kiss-o'-Death code (for example RATE when the client is being rate limited, or DENY when it is not allowed to query the server), or null when this is not a Kiss-o'-Death packet. |
| LeapIndicator | Gets the leap indicator from the server. |
| OriginateTimestamp | Gets the time at which the request was sent by the client (copied from the client's transmit timestamp). |
| PollInterval | Gets the maximum interval between successive messages, in log2 seconds. |
| Precision | Gets the precision of the server clock, in log2 seconds. |
| ReceiveTimestamp | Gets the time at which the request arrived at the server. |
| ReferenceIdentifier | Gets the raw 32-bit reference identifier. For stratum 1 it names the reference clock and for stratum 0 it carries the Kiss-o'-Death code; see NtpResponse.ReferenceIdentifierText. |
| ReferenceIdentifierText | Gets the reference identifier decoded as four ASCII characters (for example GPS or PPS), or null when it does not hold printable ASCII. For stratum 2 and above the field holds an address rather than text, so this is normally null. |
| ReferenceTimestamp | Gets the time when the server clock was last set or corrected, or null when the server did not supply one because its clock has never been synchronized. |
| RootDelay | Gets the total round-trip delay from the server to the reference clock. |
| RootDispersion | Gets the server's own estimate of the maximum error of its clock. Use it as the error bound on NtpResponse.ClockOffset: a large value means the server does not vouch for its own accuracy. |
| RoundTripDelay | Gets the estimated round-trip delay between the client and the server. |
| Stratum | Gets the stratum level of the server (0 = Kiss-o'-Death, 1 = primary reference, 2-15 = secondary). |
| TransmitTimestamp | Gets the time at which the reply was sent from the server. |
| Version | Gets the NTP version used by the server. |
ClockOffset
NtpResponse.csDestinationTimestamp
NtpResponse.csGets the local time at which the reply was received by the client.
public DateTimeOffset DestinationTimestamp { get; }Property value
IsKissOfDeath
NtpResponse.csGets a value indicating whether this is a Kiss-o'-Death packet: the server is refusing service and its timestamps carry no time. NtpResponse.KissCode says why.
public bool IsKissOfDeath { get; }Property value
Remarks
This is only ever true when NtpClientOptions.ValidateResponse is disabled; otherwise the client rejects such a response instead of returning it.
KissCode
NtpResponse.csLeapIndicator
NtpResponse.csGets the leap indicator from the server.
public NtpLeapIndicator LeapIndicator { get; }Property value
OriginateTimestamp
NtpResponse.csGets the time at which the request was sent by the client (copied from the client's transmit timestamp).
public DateTimeOffset OriginateTimestamp { get; }Property value
PollInterval
NtpResponse.csPrecision
NtpResponse.csReceiveTimestamp
NtpResponse.csGets the time at which the request arrived at the server.
public DateTimeOffset ReceiveTimestamp { get; }Property value
ReferenceIdentifier
NtpResponse.csGets the raw 32-bit reference identifier. For stratum 1 it names the reference clock and for stratum 0 it carries the Kiss-o'-Death code; see NtpResponse.ReferenceIdentifierText.
public uint ReferenceIdentifier { get; }Property value
ReferenceIdentifierText
NtpResponse.csReferenceTimestamp
NtpResponse.csGets the time when the server clock was last set or corrected, or null when the server did not supply one because its clock has never been synchronized.
public DateTimeOffset? ReferenceTimestamp { get; }Property value
RootDelay
NtpResponse.csRootDispersion
NtpResponse.csGets the server's own estimate of the maximum error of its clock. Use it as the error bound on NtpResponse.ClockOffset: a large value means the server does not vouch for its own accuracy.
public TimeSpan RootDispersion { get; }Property value
RoundTripDelay
NtpResponse.csStratum
NtpResponse.csTransmitTimestamp
NtpResponse.csGets the time at which the reply was sent from the server.
public DateTimeOffset TransmitTimestamp { get; }