◆ UdpSender()
| UdpSender |
( |
boost::asio::io_service & |
io_service, |
|
|
const std::string & |
ip_address, |
|
|
unsigned short |
port, |
|
|
const std::string & |
interface, |
|
|
bool |
multicast |
|
) |
| |
Creates a UdpSender that sends strings over the network to the given address and port.
- Exceptions
-
- Parameters
-
| io_service | The io_service to use to service outgoing SendString data |
| ip_address | The ip address to send data on (IPv4 in dotted decimal or IPv6 in hex string) example IPv4: 192.168.0.2 example IPv6: ff02::c3d0:42d2:bb8 |
| port | The port to send SendString data to |
| interface | The interface to send data on |
| multicast | If true, joins the multicast group of given ip_address |
◆ ~UdpSender()
◆ getInterface()
| std::string getInterface |
( |
| ) |
const |
Get the interface that this sender is sending on.
- Returns
- The interface as a string
◆ getIpAddress()
| std::string getIpAddress |
( |
| ) |
const |
Get the IP address that this sender is sending to.
- Returns
- The IP address as a string
◆ sendString()
| void sendString |
( |
const std::string & |
message | ) |
|
Get the port that this sender is sending to
- Returns
- The port as an unsigned short Sends a string message to the initialized ip address and port This function returns after the message has been sent.
- Parameters
-
| message | The string message to send |
◆ sendStringAsync()
| void sendStringAsync |
( |
const std::string & |
message | ) |
|
Sends a string message to the initialized ip address and port asynchronously This function returns immediately.
- Parameters
-
| message | The string message to send |
The documentation for this class was generated from the following files:
- src/software/networking/udp/udp_sender.h
- src/software/networking/udp/udp_sender.cpp