C# Class ChatterBox.Client.Presentation.Shared.Services.NtpService

Inheritance: ChatterBox.Client.Presentation.Shared.MVVM.DispatcherBindableBase
ファイルを表示 Open project: openpeer/ChatterBox Class Usage Examples

Public Methods

Method Description
GetNetworkTime ( string ntpServer ) : void

Retrieve the current network time from ntp server "time.windows.com".

NtpService ( CoreDispatcher uiDispatcher ) : System
OnNTPTimeReceived ( Windows socket, Windows eventArguments ) : void

Event hander when receiving response from the ntp server.

ReportNtpSyncStatus ( bool status, int rtt ) : void

Report whether succeeded in sync with the ntp server or not.

abortSync ( ) : void

Private Methods

Method Description
NTPQueryTimeout ( object sender, object e ) : void

Report whether succeeded in sync with the ntp server or not.

SendNTPQuery ( object sender, object e ) : void
SwapEndianness ( ulong x ) : uint

Method Details

GetNetworkTime() public method

Retrieve the current network time from ntp server "time.windows.com".
public GetNetworkTime ( string ntpServer ) : void
ntpServer string
return void

NtpService() public method

public NtpService ( CoreDispatcher uiDispatcher ) : System
uiDispatcher Windows.UI.Core.CoreDispatcher
return System

OnNTPTimeReceived() public method

Event hander when receiving response from the ntp server.
public OnNTPTimeReceived ( Windows socket, Windows eventArguments ) : void
socket Windows The udp socket object which triggered this event
eventArguments Windows event information
return void

ReportNtpSyncStatus() public method

Report whether succeeded in sync with the ntp server or not.
public ReportNtpSyncStatus ( bool status, int rtt ) : void
status bool
rtt int
return void

abortSync() public method

public abortSync ( ) : void
return void