Poco::Net

class NTPEventArgs

File Information

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

Description

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.

Member Summary

Member Functions: hostAddress, hostName, packet

Constructors

NTPEventArgs

NTPEventArgs(
    const SocketAddress & address
);

Creates NTPEventArgs.

Destructor

~NTPEventArgs virtual

virtual ~NTPEventArgs();

Destroys NTPEventArgs.

Member Functions

hostAddress

std::string hostAddress() const;

Returns the target IP address.

hostName

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.

packet inline

const NTPPacket & packet();

Returns the NTP packet.