#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/Bonjour.hpp>
◆ UdpSocket() [1/2]
| Slic3r::UdpSocket::UdpSocket |
( |
Bonjour::ReplyFn | replyfn, |
|
|
const boost::asio::ip::address & | multicast_address, |
|
|
const boost::asio::ip::address & | interface_address, |
|
|
std::shared_ptr< boost::asio::io_context > | io_service ) |
◆ UdpSocket() [2/2]
| Slic3r::UdpSocket::UdpSocket |
( |
Bonjour::ReplyFn | replyfn, |
|
|
const boost::asio::ip::address & | multicast_address, |
|
|
std::shared_ptr< boost::asio::io_context > | io_service ) |
◆ async_receive()
| void Slic3r::UdpSocket::async_receive |
( |
| ) |
|
717{
718 try {
719
721 socket.async_receive_from(asio::buffer(session->buffer, session->buffer.size())
722 , session->remote_endpoint
724 }
725 catch (std::exception& e) {
726 BOOST_LOG_TRIVIAL(error) << e.what();
727 }
728}
void receive_handler(SharedSession session, const boost::system::error_code &error, size_t bytes)
Definition Bonjour.cpp:730
boost::asio::ip::udp::socket socket
Definition Bonjour.hpp:183
virtual SharedSession create_session() const =0
References create_session(), receive_handler(), and socket.
Referenced by receive_handler(), and send().
◆ cancel()
| void Slic3r::UdpSocket::cancel |
( |
| ) |
|
|
inline |
◆ create_session()
| virtual SharedSession Slic3r::UdpSocket::create_session |
( |
| ) |
const |
|
protectedpure virtual |
◆ receive_handler()
| void Slic3r::UdpSocket::receive_handler |
( |
SharedSession | session, |
|
|
const boost::system::error_code & | error, |
|
|
size_t | bytes ) |
|
protected |
◆ send()
| void Slic3r::UdpSocket::send |
( |
| ) |
|
703{
704 try {
705 for (
const auto& request :
requests)
707
708
710 }
711 catch (std::exception& e) {
712 BOOST_LOG_TRIVIAL(error) << e.what();
713 }
714}
boost::asio::ip::udp::endpoint mcast_endpoint
Definition Bonjour.hpp:184
std::vector< BonjourRequest > requests
Definition Bonjour.hpp:186
References async_receive(), mcast_endpoint, requests, and socket.
◆ io_service
| std::shared_ptr< boost::asio::io_context > Slic3r::UdpSocket::io_service |
|
protected |
◆ mcast_endpoint
| boost::asio::ip::udp::endpoint Slic3r::UdpSocket::mcast_endpoint |
|
protected |
◆ multicast_address
| boost::asio::ip::address Slic3r::UdpSocket::multicast_address |
|
protected |
◆ replyfn
◆ requests
◆ socket
| boost::asio::ip::udp::socket Slic3r::UdpSocket::socket |
|
protected |
The documentation for this class was generated from the following files:
- /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/Bonjour.hpp
- /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/Bonjour.cpp