Skip to content

Commit

Permalink
Merge pull request COVESA#314 from doschropa/add-support-for-broadcas…
Browse files Browse the repository at this point in the history
…t-messages

Fix for issue COVESA#313, Handle service discovery messages from broadcast
  • Loading branch information
lutzbichler authored Mar 15, 2022
2 parents 8634ad9 + 2a3c993 commit 94b6130
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions implementation/endpoints/src/udp_server_endpoint_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ void udp_server_endpoint_impl::join_unlocked(const std::string &_address) {
boost::asio::socket_base::reuse_address optionReuseAddress(true);
multicast_socket_->set_option(optionReuseAddress, ec);
boost::asio::detail::throw_error(ec, "reuse address in multicast");
boost::asio::socket_base::broadcast optionBroadcast(true);
multicast_socket_->set_option(optionBroadcast, ec);
boost::asio::detail::throw_error(ec, "set broadcast option");

multicast_socket_->bind(*multicast_local_, ec);
boost::asio::detail::throw_error(ec, "bind multicast");
Expand Down

0 comments on commit 94b6130

Please sign in to comment.