#include <udp_client.h>
|
| UDPClient (const std::string &src_addr, uint16_t src_port, size_t tx_buffer_size=0) |
|
| UDPClient (uint16_t src_port) |
|
| UDPClient (const std::string &src_addr) |
|
UDPClient & | operator= (const UDPClient &)=delete |
|
| UDPClient (const UDPClient &)=delete |
|
| ~UDPClient ()=default |
|
ssize_t | Connect (const std::string &remote_address, uint16_t remote_port) |
| The remote_address | remote_port is the address to which datagrams are sent. 1:1 association me->remote. More...
|
|
void | Send (const std::string &rem_hostname, uint16_t rem_port, const std::byte *msg, size_t len) |
| Send one UDP packet to a remote server. The client caches the the remote server's addrinfo after resolving it for the first time. After the first time, sending data does not require expensive addrinfo resolution. More...
|
|
void | Send (const std::byte *msg, size_t len) |
| Send one UDP packet to the connected remote server. More...
|
|
void | EnableRecording () |
|
◆ UDPClient() [1/4]
UDPClient::UDPClient |
( |
const std::string & |
src_addr, |
|
|
uint16_t |
src_port, |
|
|
size_t |
tx_buffer_size = 0 |
|
) |
| |
|
inlineexplicit |
◆ UDPClient() [2/4]
UDPClient::UDPClient |
( |
uint16_t |
src_port | ) |
|
|
inlineexplicit |
◆ UDPClient() [3/4]
UDPClient::UDPClient |
( |
const std::string & |
src_addr | ) |
|
|
inlineexplicit |
◆ UDPClient() [4/4]
◆ ~UDPClient()
UDPClient::~UDPClient |
( |
| ) |
|
|
default |
◆ Connect()
ssize_t UDPClient::Connect |
( |
const std::string & |
remote_address, |
|
|
uint16_t |
remote_port |
|
) |
| |
|
inline |
The remote_address | remote_port is the address to which datagrams are sent. 1:1 association me->remote.
- Parameters
-
remote_address | Hostname or IP address of the remote server |
remote_port | UDP port that the remote server is listening on |
◆ EnableRecording()
void UDPClient::EnableRecording |
( |
| ) |
|
|
inline |
◆ operator=()
◆ Send() [1/2]
void UDPClient::Send |
( |
const std::byte * |
msg, |
|
|
size_t |
len |
|
) |
| |
|
inline |
Send one UDP packet to the connected remote server.
- Parameters
-
msg | Pointer to the message to send |
len | Length in bytes of the message to send |
◆ Send() [2/2]
void UDPClient::Send |
( |
const std::string & |
rem_hostname, |
|
|
uint16_t |
rem_port, |
|
|
const std::byte * |
msg, |
|
|
size_t |
len |
|
) |
| |
|
inline |
Send one UDP packet to a remote server. The client caches the the remote server's addrinfo after resolving it for the first time. After the first time, sending data does not require expensive addrinfo resolution.
- Parameters
-
rem_hostname | Hostname or IP address of the remote server |
rem_port | UDP port that the remote server is listening on |
msg | Pointer to the message to send |
len | Length in bytes of the message to send |
◆ comm_object_
The documentation for this class was generated from the following file: