8 #define IO_ENDPOINT_H 1
24 #include <sys/socket.h>
82 virtual uint16_t
getPort()
const = 0;
126 virtual const struct sockaddr&
getSockAddr()
const = 0;
153 const unsigned short port);
176 std::ostream&
operator<<(std::ostream& os,
const IOEndpoint& endpoint);
179 #endif // IO_ENDPOINT_H
IOEndpoint()
The default constructor.
bool operator==(const IOEndpoint &other) const
virtual short getProtocol() const =0
Returns the protocol number of the endpoint (TCP, UDP...)
std::ostream & operator<<(std::ostream &os, const IOAddress &address)
Insert the IOAddress as a string into stream.
virtual short getFamily() const =0
Returns the address family of the endpoint.
virtual ~IOEndpoint()
The destructor.
virtual IOAddress getAddress() const =0
Returns the address of the endpoint.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual const struct sockaddr & getSockAddr() const =0
Returns the address of the endpoint in the form of sockaddr structure.
A wrapper interface for the ASIO library.
bool operator!=(const IOEndpoint &other) const
static const IOEndpoint * create(const int protocol, const IOAddress &address, const unsigned short port)
A polymorphic factory of endpoint from address and port.
virtual uint16_t getPort() const =0
Returns the port of the endpoint.
The IOAddress class represents an IP addresses (version agnostic)
The IOEndpoint class is an abstract base class to represent a communication endpoint.