Poco::Net

class NTPClient

File Information

Library: Net
Package: NTP
Header: Poco/Net/NTPClient.h

Description

This class provides NTP (Network Time Protocol) client functionality.

Member Summary

Member Functions: request

Constructors

NTPClient

explicit NTPClient(
    SocketAddress::Family family,
    int timeout = 3000000
);

Creates an NTP client.

Destructor

~NTPClient

~NTPClient();

Destroys the NTP client.

Member Functions

request

int request(
    SocketAddress & address
) const;

Request the time from the server at address. Notifications are posted for events.

Returns the number of valid replies.

request

int request(
    const std::string & address
) const;

Request the time from the server at address. Notifications are posted for events.

Returns the number of valid replies.

Variables

response

mutable Poco::BasicEvent < NTPEventArgs > response;

Securely control IoT edge devices from anywhere   Connect a Device