◆ ThreadedProtoUdpSender()
template<class SendProto >
| ThreadedProtoUdpSender |
( |
const std::string & |
ip_address, |
|
|
unsigned short |
port, |
|
|
const std::string & |
interface, |
|
|
bool |
multicast |
|
) |
| |
Creates a UdpSender that sends the SendProto over the network on the given address and port.
- Exceptions
-
- Parameters
-
| 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 SendProto data on |
| interface | The interface to send data on |
| multicast | If true, joins the multicast group of given ip_address |
| error | An optional user-provided string that will be set to an error message if an error occurs |
◆ getInterface()
template<class SendProto >
| std::string getInterface |
( |
| ) |
const |
Get the interface that this sender is sending on.
- Returns
- The interface as a string
◆ getIpAddress()
template<class SendProto >
| std::string getIpAddress |
( |
| ) |
const |
Get the IP address that this sender is sending to.
- Returns
- The IP address as a string
◆ sendProto()
template<class SendProto >
| void sendProto |
( |
const SendProto & |
message, |
|
|
bool |
async = false |
|
) |
| |
Sends a protobuf message to the initialized ip address and port This function returns after the message has been sent.
- Parameters
-
| message | The protobuf message to send |
| async | If true, the message will be sent asynchronously otherwise it will be send synchronously |
The documentation for this class was generated from the following file: