67 std::vector<std::uint8_t>
data;
132 virtual void SetTimeout(std::chrono::milliseconds timeout) = 0;
Abstract interface for IPv4 UDP datagram transport.
virtual void SetTimeout(std::chrono::milliseconds timeout)=0
Set the UDP receive timeout.
virtual void SendTo(const std::vector< std::uint8_t > &data, const UdpEndpoint &destination)=0
Send a UDP datagram to a specific IPv4 endpoint.
virtual ~IUdpSocket()=default
Virtual destructor for polymorphic use.
virtual UdpDatagram RecvFrom(std::size_t maxLen)=0
Receive one UDP datagram and its source endpoint.
A UDP datagram together with the IPv4 address of its sender.
std::vector< std::uint8_t > data
Datagram payload.
UdpEndpoint source
IPv4 address and UDP port of the datagram sender.
Portable IPv4 UDP endpoint.
std::string address
Numeric IPv4 address in dotted-decimal notation.
bool operator==(const UdpEndpoint &other) const =default
Compare two UDP endpoints.
std::uint16_t port
UDP port in host byte order.