#include <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_service > |
io_service |
|
) |
| |
◆ UdpSocket() [2/2]
| Slic3r::UdpSocket::UdpSocket |
( |
Bonjour::ReplyFn |
replyfn, |
|
|
const boost::asio::ip::address & |
multicast_address, |
|
|
std::shared_ptr< boost::asio::io_service > |
io_service |
|
) |
| |
◆ async_receive()
| void Slic3r::UdpSocket::async_receive |
( |
| ) |
|
695{
696 try {
697
699 socket.async_receive_from(asio::buffer(session->buffer, session->buffer.size())
700 , session->remote_endpoint
702 }
703 catch (std::exception& e) {
704 BOOST_LOG_TRIVIAL(
error) << e.what();
705 }
706}
void receive_handler(SharedSession session, const boost::system::error_code &error, size_t bytes)
Definition Bonjour.cpp:708
boost::asio::ip::udp::socket socket
Definition Bonjour.hpp:169
virtual SharedSession create_session() const =0
static char error[256]
Definition tga.cpp:50
References create_session(), error, 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 |
( |
| ) |
|
681{
682 try {
683 for (
const auto& request :
requests)
685
686
688 }
689 catch (std::exception& e) {
690 BOOST_LOG_TRIVIAL(
error) << e.what();
691 }
692}
boost::asio::ip::udp::endpoint mcast_endpoint
Definition Bonjour.hpp:170
std::vector< BonjourRequest > requests
Definition Bonjour.hpp:172
References async_receive(), error, mcast_endpoint, requests, and socket.
◆ io_service
| std::shared_ptr< boost::asio::io_service > 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: