24#include <sys/socket.h>
47 IOEndpoint& operator=(
const IOEndpoint& source);
128 bool operator==(
const IOEndpoint& other)
const;
129 bool operator!=(
const IOEndpoint& other)
const;
151 static const IOEndpoint*
create(
const int protocol,
153 const unsigned short port);
The IOAddress class represents an IP addresses (version agnostic)
The IOEndpoint class is an abstract base class to represent a communication endpoint.
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.
IOEndpoint()
The default constructor.
virtual short getFamily() const =0
Returns the address family of the endpoint.
virtual IOAddress getAddress() const =0
Returns the address of the endpoint.
virtual ~IOEndpoint()
The destructor.
virtual const struct sockaddr & getSockAddr() const =0
Returns the address of the endpoint in the form of sockaddr structure.
bool operator==(const IOEndpoint &other) const
virtual short getProtocol() const =0
Returns the protocol number of the endpoint (TCP, UDP...)
virtual uint16_t getPort() const =0
Returns the port of the endpoint.
std::ostream & operator<<(std::ostream &os, const IOAddress &address)
Insert the IOAddress as a string into stream.
Defines the logger used by the top-level component of kea-lfc.