TraveSim Adapters  0.1
Protobuf adapters for TraveSim project
unicast_sender.cpp
Go to the documentation of this file.
1 /**
2  * @file unicast_sender.cpp
3  *
4  * @author Lucas Haug <lucas.haug@thuneratz.org>
5  * @author Lucas Schneider <lucas.schneider@thuneratz.org>
6  *
7  * @brief Send data using UDP in unicast mode
8  *
9  * @date 04/2021
10  *
11  * @copyright MIT License - Copyright (c) 2021 ThundeRatz
12  */
13 
15 
16 /*****************************************
17  * Class Methods Bodies Definitions
18  *****************************************/
19 
20 namespace travesim {
21 namespace udp {
22 UnicastSender::UnicastSender(std::string receiver_address, short receiver_port) :
23  Sender(receiver_address, receiver_port) {
24  this->socket->set_option(boost::asio::ip::unicast::hops(1));
25 };
26 } // namespace udp
27 } // namespace travesim
UnicastSender(const std::string receiver_address, const short receiver_port)
Construct a new UnicastSender object.
boost::asio::ip::udp::socket * socket
Definition: sender.hpp:59
Send data using UDP in unicast mode.
Sender class using UDP.
Definition: sender.hpp:25