21#ifndef GF_UDP_SOCKET_H
22#define GF_UDP_SOCKET_H
29#include "SocketAddress.h"
34#ifndef DOXYGEN_SHOULD_SKIP_THIS
135#ifndef DOXYGEN_SHOULD_SKIP_THIS
A socket address.
Definition: SocketAddress.h:78
A network socket.
Definition: Socket.h:41
A UDP socket.
Definition: UdpSocket.h:51
bool sendBytesTo(Span< const uint8_t > buffer, const SocketAddress &address)
Send a whole buffer to the socket.
SocketAddress getRemoteAddress(const std::string &hostname, const std::string &service)
Get a remote address for this socket.
bool recvBytesFrom(Span< uint8_t > buffer, SocketAddress &address)
Receive a whole buffer from the socket.
UdpSocket(const std::string &service, SocketFamily family=SocketFamily::Unspec)
Full constructor.
SocketDataResult recvRawBytesFrom(Span< uint8_t > buffer, SocketAddress &address)
Receive some bytes from the socket.
UdpSocket(AnyType, SocketFamily family=SocketFamily::Unspec)
Full constructor.
SocketDataResult sendRawBytesTo(Span< const uint8_t > buffer, const SocketAddress &address)
Send some bytes over to the socket.
UdpSocket()=default
Default constructor.
SocketFamily
A socket family.
Definition: SocketAddress.h:50
@ Unspec
Unspecified (either IPv4 or IPv6)
The namespace for gf classes.
Semantic type to represent "any".
Definition: Types.h:69
The result of a socket operation.
Definition: SocketTypes.h:89