8 #define UDP_ENDPOINT_H 1
10 #ifndef BOOST_ASIO_HPP
11 #error "asio.hpp must be included before including this, see asiolink.h as to why"
35 asio_endpoint_placeholder_(new
boost::asio::ip::udp::endpoint()),
36 asio_endpoint_(*asio_endpoint_placeholder_)
44 asio_endpoint_placeholder_(
45 new
boost::asio::ip::udp::endpoint(
boost::asio::ip::address::from_string(address.toText()),
47 asio_endpoint_(*asio_endpoint_placeholder_)
57 asio_endpoint_placeholder_(NULL), asio_endpoint_(asio_endpoint)
66 UDPEndpoint(
const boost::asio::ip::udp::endpoint& asio_endpoint) :
67 asio_endpoint_placeholder_(new
boost::asio::ip::udp::endpoint(asio_endpoint)),
68 asio_endpoint_(*asio_endpoint_placeholder_)
76 return (asio_endpoint_.address());
80 return (*asio_endpoint_.data());
84 return (asio_endpoint_.port());
88 return (asio_endpoint_.protocol().protocol());
92 return (asio_endpoint_.protocol().family());
98 return (asio_endpoint_);
101 return (asio_endpoint_);
105 boost::asio::ip::udp::endpoint* asio_endpoint_placeholder_;
106 boost::asio::ip::udp::endpoint& asio_endpoint_;
111 #endif // UDP_ENDPOINT_H
UDPEndpoint(boost::asio::ip::udp::endpoint &asio_endpoint)
Constructor from an ASIO UDP endpoint.
virtual short getFamily() const
Returns the address family of the endpoint.
The UDPEndpoint class is a concrete derived class of IOEndpoint that represents an endpoint of a UDP ...
virtual const struct sockaddr & getSockAddr() const
Returns the address of the endpoint in the form of sockaddr structure.
virtual short getProtocol() const
Returns the protocol number of the endpoint (TCP, UDP...)
const boost::asio::ip::udp::endpoint & getASIOEndpoint() const
virtual ~UDPEndpoint()
The destructor.
UDPEndpoint()
Default Constructor.
UDPEndpoint(const IOAddress &address, const unsigned short port)
Constructor from a pair of address and port.
Defines the logger used by the top-level component of kea-dhcp-ddns.
A wrapper interface for the ASIO library.
virtual uint16_t getPort() const
Returns the port of the endpoint.
boost::asio::ip::udp::endpoint & getASIOEndpoint()
UDPEndpoint(const boost::asio::ip::udp::endpoint &asio_endpoint)
Constructor from an ASIO UDP endpoint.
The IOAddress class represents an IP addresses (version agnostic)
virtual IOAddress getAddress() const
Returns the address of the endpoint.
The IOEndpoint class is an abstract base class to represent a communication endpoint.