8#define UDP_ENDPOINT_H 1
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::make_address(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_;
The IOAddress class represents an IP addresses (version agnostic)
virtual uint16_t getPort() const
Returns the port of the endpoint.
virtual short getFamily() const
Returns the address family of the endpoint.
virtual const struct sockaddr & getSockAddr() const
Returns the address of the endpoint in the form of sockaddr structure.
virtual ~UDPEndpoint()
The destructor.
UDPEndpoint(const boost::asio::ip::udp::endpoint &asio_endpoint)
Constructor from an ASIO UDP endpoint.
UDPEndpoint()
Default Constructor.
virtual short getProtocol() const
Returns the protocol number of the endpoint (TCP, UDP...)
virtual IOAddress getAddress() const
Returns the address of the endpoint.
UDPEndpoint(boost::asio::ip::udp::endpoint &asio_endpoint)
Constructor from an ASIO UDP endpoint.
UDPEndpoint(const IOAddress &address, const unsigned short port)
Constructor from a pair of address and port.
const boost::asio::ip::udp::endpoint & getASIOEndpoint() const
boost::asio::ip::udp::endpoint & getASIOEndpoint()
Defines the logger used by the top-level component of kea-lfc.