Bonjour - resolve hostname to IP using mdns.

Octoprint - on Windows use Bonjour resolving to get IP address before the http connection. Only use Windows address resolving if Bonjour couldn't resolve.
This commit is contained in:
David Kocik 2022-04-20 13:50:43 +02:00
parent fbdf777898
commit d2c6f597d2
4 changed files with 577 additions and 18 deletions

View file

@ -8,6 +8,7 @@
#include "PrintHost.hpp"
#include "libslic3r/PrintConfig.hpp"
class boost::asio::ip::address;
namespace Slic3r {
@ -35,6 +36,10 @@ public:
protected:
virtual bool validate_version_text(const boost::optional<std::string> &version_text) const;
virtual bool upload_inner(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, const std::vector<boost::asio::ip::address>& resolved_addr) const;
virtual bool test_with_resolved_ip(wxString& curl_msg) const;
virtual bool upload_inner_with_host(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const;
private:
std::string m_host;