TraveSim Adapters  0.1
Protobuf adapters for TraveSim project
multicast_sender.cpp
Go to the documentation of this file.
1 /**
2  * @file multicast_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 multicast 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 MulticastSender::MulticastSender(std::string multicast_address, short multicast_port) :
23  Sender(multicast_address, multicast_port) {
24  this->socket->set_option(boost::asio::ip::multicast::hops(1));
25 };
26 } // namespace udp
27 } // namespace travesim
MulticastSender(const std::string multicast_address, const short multicast_port)
Construct a new Multicast Sender object.
Send data using UDP in multicast mode.
boost::asio::ip::udp::socket * socket
Definition: sender.hpp:59
Sender class using UDP.
Definition: sender.hpp:25