class Poco::Net::NTPEventArgs

Overview

The purpose of the NTPEventArgs class is to be used as template parameter to instantiate event members in NTPClient class. Moreā€¦

#include <NTPEventArgs.h>

class NTPEventArgs
{
public:
    // construction

    NTPEventArgs(const SocketAddress& address);

    // methods

    std::string
    hostName() const;

    std::string
    hostAddress() const;

    const NTPPacket&
    packet();
};

Detailed Documentation

The purpose of the NTPEventArgs class is to be used as template parameter to instantiate event members in NTPClient class.

When clients register for an event notification, the reference to the class is passed to the handler function to provide information about the event.

Construction

NTPEventArgs(const SocketAddress& address)

Creates NTPEventArgs.

Methods

std::string
hostName() const

Tries to resolve the target IP address into host name.

If unsuccessful, all exceptions are silently ignored and the IP address is returned.

std::string
hostAddress() const

Returns the target IP address.

const NTPPacket&
packet()

Returns the NTP packet.