class Poco::Net::NTPClient

Overview

This class provides NTP (Network Time Protocol) client functionality. Moreā€¦

#include <NTPClient.h>

class NTPClient
{
public:
    // fields

    Poco::BasicEvent<NTPEventArgs> response;

    // construction

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

    // methods

    int
    request(SocketAddress& address) const;

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

Detailed Documentation

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

Construction

NTPClient(
    IPAddress::Family family,
    int timeout = 3000000
    )

Creates an NTP client.

Methods

int
request(SocketAddress& address) const

Request the time from the server at address.

Notifications are posted for events.

Returns the number of valid replies.

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.