1#ifndef NET_UDPSocket_h__
2#define NET_UDPSocket_h__
53 IOResult sendTo(
const void* buffer,
size_t len, std::string_view foreignAddress,
unsigned short foreignPort);
69 IOResult receiveFrom(
void* buffer,
size_t len, std::string& sourceAddress,
unsigned short& sourcePort);
InternetSocket(AddressFamily family, int type, int protocol)
allows a subclass to create new socket
UDPSocket(AddressFamily family=IPv4)
IOResult timedReceiveFrom(void *buffer, size_t len, std::string &sourceAddress, unsigned short &sourcePort, int timeout)
IOResult sendTo(const void *buffer, size_t len, std::string_view foreignAddress, unsigned short foreignPort)
void setMulticastTTL(unsigned char multicastTTL)
InternetSocket(AddressFamily family, int type, int protocol)
allows a subclass to create new socket
void leaveGroup(const std::string &multicastGroup)
static UDPSocket adoptNativeHandle(int sockfd)
Take ownership of an existing native UDP socket descriptor.
void joinGroup(const std::string &multicastGroup)
void setMulticastInterfaceAddr(const std::string &address)
IOResult receiveFrom(void *buffer, size_t len, std::string &sourceAddress, unsigned short &sourcePort)
AddressFamily
used by internet socket types