method boost::network::http::client => clear_resolved_cache() non existent?

94 views
Skip to first unread message

Lars Conrad

unread,
Sep 7, 2018, 10:18:39 AM9/7/18
to The C++ Network Library
boost::network::http::client client;
client
.clear_resolved_cache();

In file included from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client.hpp:23,

from ../DownloadTest/main.cpp:7:

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/facade.hpp: In instantiation of ‘void boost::network::http::basic_client_facade<Tag, version_major, version_minor>::clear_resolved_cache() [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1]’:

../DownloadTest/main.cpp:25:30: required from here

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/facade.hpp:294:40: error: ‘using element_type = struct boost::network::http::basic_client_impl<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>’ {aka ‘struct boost::network::http::basic_client_impl<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>’} has no member named ‘clear_resolved_cache’; did you mean ‘cache_resolved_’?

void clear_resolved_cache() { pimpl->clear_resolved_cache(); }

~~~~~~~^~~~~~~~~~~~~~~~~~~~

cache_resolved_

In file included from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_base.hpp:13,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/policies/async_connection.hpp:15,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/traits/connection_policy.hpp:13,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/async_impl.hpp:16,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/pimpl.hpp:14,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/facade.hpp:12,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client.hpp:23,

from ../DownloadTest/main.cpp:7:

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp: In instantiation of ‘static boost::network::http::impl::connection_delegate_factory<Tag>::connection_delegate_ptr boost::network::http::impl::connection_delegate_factory<Tag>::new_connection_delegate(boost::asio::io_service&, bool, bool, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; boost::network::http::impl::connection_delegate_factory<Tag>::connection_delegate_ptr = std::shared_ptr<boost::network::http::impl::connection_delegate>; boost::asio::io_service = boost::asio::io_context; typename boost::network::string<Tag>::type = std::basic_string<char>]’:

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_base.hpp:58:67: required from ‘static boost::network::http::impl::async_connection_base<Tag, version_major, version_minor>::connection_ptr boost::network::http::impl::async_connection_base<Tag, version_major, version_minor>::new_connection(boost::network::http::impl::async_connection_base<Tag, version_major, version_minor>::resolve_function, boost::network::http::impl::async_connection_base<Tag, version_major, version_minor>::resolver_type&, bool, bool, bool, int, bool, boost::optional<typename boost::network::string<Tag>::type>, const boost::optional<typename boost::network::string<Tag>::type>&, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, boost::optional<typename boost::network::string<Tag>::type>, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::impl::async_connection_base<Tag, version_major, version_minor>::connection_ptr = std::shared_ptr<boost::network::http::impl::async_connection_base<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1> >; boost::network::http::impl::async_connection_base<Tag, version_major, version_minor>::resolve_function = std::function<void(boost::asio::ip::basic_resolver<boost::asio::ip::udp>&, std::basic_string<char>, short unsigned int, std::function<void(const boost::system::error_code&, std::pair<boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp>, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp> >)>)>; boost::network::http::impl::async_connection_base<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]’

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/policies/async_connection.hpp:49:25: required from ‘boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_impl::connection_impl(bool, bool, boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolve_function, boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type&, bool, int, bool, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolve_function = std::function<void(boost::asio::ip::basic_resolver<boost::asio::ip::udp>&, std::basic_string<char>, short unsigned int, std::function<void(const boost::system::error_code&, std::pair<boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp>, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp> >)>)>; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]’

/usr/include/c++/8/ext/new_allocator.h:136:4: required from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl; _Args = {bool&, bool&, boost::network::http::async_connection_policy<Tag, version_major, version_minor>::get_connection(boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type&, const boost::network::http::basic_request<Tag>&, bool, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_ptr = std::shared_ptr<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]::<lambda(boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolver_type&, const string_type&, uint16_t, boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolve_completion_function)>, boost::asio::ip::basic_resolver<boost::asio::ip::udp>&, bool, int&, bool&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, long int&}; _Tp = boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl]’

/usr/include/c++/8/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl; _Args = {bool&, bool&, boost::network::http::async_connection_policy<Tag, version_major, version_minor>::get_connection(boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type&, const boost::network::http::basic_request<Tag>&, bool, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_ptr = std::shared_ptr<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]::<lambda(boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolver_type&, const string_type&, uint16_t, boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolve_completion_function)>, boost::asio::ip::basic_resolver<boost::asio::ip::udp>&, bool, int&, bool&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, long int&}; _Tp = boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>]’

/usr/include/c++/8/bits/shared_ptr_base.h:549:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {bool&, bool&, boost::network::http::async_connection_policy<Tag, version_major, version_minor>::get_connection(boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type&, const boost::network::http::basic_request<Tag>&, bool, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_ptr = std::shared_ptr<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]::<lambda(boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolver_type&, const string_type&, uint16_t, boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolve_completion_function)>, boost::asio::ip::basic_resolver<boost::asio::ip::udp>&, bool, int&, bool&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, long int&}; _Tp = boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl; _Alloc = std::allocator<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’

/usr/include/c++/8/bits/shared_ptr_base.h:662:4: [ skipping 3 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]

/usr/include/c++/8/bits/shared_ptr.h:706:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl; _Alloc = std::allocator<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; _Args = {bool&, bool&, boost::network::http::async_connection_policy<Tag, version_major, version_minor>::get_connection(boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type&, const boost::network::http::basic_request<Tag>&, bool, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_ptr = std::shared_ptr<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]::<lambda(boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolver_type&, const string_type&, uint16_t, boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolve_completion_function)>, boost::asio::ip::basic_resolver<boost::asio::ip::udp>&, bool, int&, bool&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, long int&}]’

/usr/include/c++/8/bits/shared_ptr.h:722:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl; _Args = {bool&, bool&, boost::network::http::async_connection_policy<Tag, version_major, version_minor>::get_connection(boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type&, const boost::network::http::basic_request<Tag>&, bool, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_ptr = std::shared_ptr<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]::<lambda(boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolver_type&, const string_type&, uint16_t, boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::resolve_completion_function)>, boost::asio::ip::basic_resolver<boost::asio::ip::udp>&, bool, int&, bool&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, const boost::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, long int&}]’

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/policies/async_connection.hpp:82:45: required from ‘boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_ptr boost::network::http::async_connection_policy<Tag, version_major, version_minor>::get_connection(boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type&, const boost::network::http::basic_request<Tag>&, bool, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, const boost::optional<typename boost::network::string<Tag>::type>&, long int) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::connection_ptr = std::shared_ptr<boost::network::http::async_connection_policy<boost::network::http::tags::http_async_8bit_udp_resolve, 1, 1>::connection_impl>; boost::network::http::async_connection_policy<Tag, version_major, version_minor>::resolver_type = boost::asio::ip::basic_resolver<boost::asio::ip::udp>; typename boost::network::string<Tag>::type = std::basic_string<char>]’

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/async_impl.hpp:85:50: required from ‘const boost::network::http::basic_response<Tag> boost::network::http::impl::async_client<Tag, version_major, version_minor>::request_skeleton(const boost::network::http::basic_request<Tag>&, const string_type&, bool, boost::network::http::impl::async_client<Tag, version_major, version_minor>::body_callback_function_type, boost::network::http::impl::async_client<Tag, version_major, version_minor>::body_generator_function_type) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::impl::async_client<Tag, version_major, version_minor>::string_type = std::basic_string<char>; boost::network::http::impl::async_client<Tag, version_major, version_minor>::body_callback_function_type = std::function<void(const boost::iterator_range<const char*>&, const boost::system::error_code&)>; typename std::array<typename boost::network::char_<Tag>::type, 1024>::const_iterator = const char*; boost::network::http::impl::async_client<Tag, version_major, version_minor>::body_generator_function_type = std::function<bool(std::basic_string<char>&)>; typename boost::network::string<Tag>::type = std::basic_string<char>]’

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/facade.hpp:85:66: required from ‘boost::network::http::basic_client_facade<Tag, version_major, version_minor>::response boost::network::http::basic_client_facade<Tag, version_major, version_minor>::get(const request&, boost::network::http::basic_client_facade<Tag, version_major, version_minor>::body_callback_function_type) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::basic_client_facade<Tag, version_major, version_minor>::response = boost::network::http::basic_response<boost::network::http::tags::http_async_8bit_udp_resolve>; boost::network::http::basic_client_facade<Tag, version_major, version_minor>::request = boost::network::http::basic_request<boost::network::http::tags::http_async_8bit_udp_resolve>; boost::network::http::basic_client_facade<Tag, version_major, version_minor>::body_callback_function_type = std::function<void(const boost::iterator_range<const char*>&, const boost::system::error_code&)>; typename std::array<typename boost::network::char_<Tag>::type, 1024>::const_iterator = const char*]’

../DownloadTest/main.cpp:27:72: required from here

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:37:58: warning: unused parameter ‘always_verify_peer’ [-Wunused-parameter]

boost::asio::io_service& service, bool https, bool always_verify_peer,

~~~~~^~~~~~~~~~~~~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:38:29: warning: unused parameter ‘certificate_filename’ [-Wunused-parameter]

optional<string_type> certificate_filename,

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:39:29: warning: unused parameter ‘verify_path’ [-Wunused-parameter]

optional<string_type> verify_path, optional<string_type> certificate_file,

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:39:64: warning: unused parameter ‘certificate_file’ [-Wunused-parameter]

optional<string_type> verify_path, optional<string_type> certificate_file,

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:40:29: warning: unused parameter ‘private_key_file’ [-Wunused-parameter]

optional<string_type> private_key_file, optional<string_type> ciphers,

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:40:69: warning: unused parameter ‘ciphers’ [-Wunused-parameter]

optional<string_type> private_key_file, optional<string_type> ciphers,

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:41:29: warning: unused parameter ‘sni_hostname’ [-Wunused-parameter]

optional<string_type> sni_hostname, long ssl_options) {

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/connection_delegate_factory.hpp:41:48: warning: unused parameter ‘ssl_options’ [-Wunused-parameter]

optional<string_type> sni_hostname, long ssl_options) {

~~~~~^~~~~~~~~~~

In file included from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_base.hpp:16,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/policies/async_connection.hpp:15,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/traits/connection_policy.hpp:13,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/async_impl.hpp:16,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/pimpl.hpp:14,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/facade.hpp:12,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client.hpp:23,

from ../DownloadTest/main.cpp:7:

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp: In instantiation of ‘void boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::handle_sent_request(bool, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type, const boost::system::error_code&, std::size_t) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type = std::function<void(const boost::iterator_range<const char*>&, const boost::system::error_code&)>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type = std::function<bool(std::basic_string<char>&)>; std::size_t = long unsigned int]’:

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:262:34: required from ‘void boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::handle_connected(boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::string_type, uint16_t, uint16_t, bool, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::resolver_iterator_pair, const boost::system::error_code&) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::string_type = std::basic_string<char>; uint16_t = short unsigned int; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type = std::function<void(const boost::iterator_range<const char*>&, const boost::system::error_code&)>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type = std::function<bool(std::basic_string<char>&)>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::resolver_iterator_pair = std::pair<boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp>, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp> >]’

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:239:15: required from ‘void boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::handle_resolved(boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::string_type, uint16_t, uint16_t, bool, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type, const boost::system::error_code&, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::resolver_iterator_pair) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::string_type = std::basic_string<char>; uint16_t = short unsigned int; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type = std::function<void(const boost::iterator_range<const char*>&, const boost::system::error_code&)>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type = std::function<bool(std::basic_string<char>&)>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::resolver_iterator_pair = std::pair<boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp>, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp> >]’

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:197:37: required from ‘boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::response boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::start(const request&, const string_type&, bool, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::response = boost::network::http::basic_response<boost::network::http::tags::http_async_8bit_udp_resolve>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::request = boost::network::http::basic_request<boost::network::http::tags::http_async_8bit_udp_resolve>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::string_type = std::basic_string<char>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type = std::function<void(const boost::iterator_range<const char*>&, const boost::system::error_code&)>; boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_generator_function_type = std::function<bool(std::basic_string<char>&)>]’

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:167:20: required from here

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:289:40: warning: unused parameter ‘bytes_transferred’ [-Wunused-parameter]

std::size_t bytes_transferred) {

~~~~~~~~~~~~^~~~~~~~~~~~~~~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp: In member function ‘void boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::handle_received_data(boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::state_t, bool, boost::network::http::impl::http_async_connection<Tag, version_major, version_minor>::body_callback_function_type, const boost::system::error_code&, std::size_t) [with Tag = boost::network::http::tags::http_async_8bit_udp_resolve; unsigned int version_major = 1; unsigned int version_minor = 1]’:

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:355:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

if (!parsed_ok || indeterminate(parsed_ok)) {

^~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:358:9: note: here

case status:

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:368:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

if (!parsed_ok || indeterminate(parsed_ok)) {

^~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:371:9: note: here

case status_message:

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:380:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

if (!parsed_ok || indeterminate(parsed_ok)) {

^~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:383:9: note: here

case headers:

^~~~

In file included from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_base.hpp:16,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/policies/async_connection.hpp:15,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/traits/connection_policy.hpp:13,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/async_impl.hpp:16,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/pimpl.hpp:14,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/facade.hpp:12,

from /usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client.hpp:23,

from ../DownloadTest/main.cpp:7:

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:564:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

this->version_promise.set_exception(std::make_exception_ptr(error));

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:565:9: note: here

case status:

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:566:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

this->status_promise.set_exception(std::make_exception_ptr(error));

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:567:9: note: here

case status_message:

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:568:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

this->status_message_promise.set_exception(

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:570:9: note: here

case headers:

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:571:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

this->headers_promise.set_exception(std::make_exception_ptr(error));

^~~~

/usr/local/src/cpp-netlib/cpp-netlib/boost/network/protocol/http/client/connection/async_normal.hpp:572:9: note: here

case body:

^~~~


Sarcasm:
If you get errors/warnings like this, you know that your code obfuscator has done a great job.

Dean Michael Berris

unread,
Sep 7, 2018, 10:31:28 AM9/7/18
to cpp-n...@googlegroups.com
Hi Lars,

Can you say what version of the library you’re using, and where you’ve seen mention of using `clear_resolved_cache()` in any of the newer versions (0.12.x, 0.13.x)?

Cheers
> --
> You received this message because you are subscribed to the Google Groups "The C++ Network Library" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cpp-netlib+...@googlegroups.com.
> To post to this group, send email to cpp-n...@googlegroups.com.
> Visit this group at https://groups.google.com/group/cpp-netlib.
> For more options, visit https://groups.google.com/d/optout.

Lars Conrad

unread,
Sep 7, 2018, 10:44:13 AM9/7/18
to The C++ Network Library
On Friday, September 7, 2018 at 4:31:28 PM UTC+2, Dean Michael Berris wrote:
... Can you say what version of the library you’re using, and where you’ve seen mention of using `clear_resolved_cache()` in any of the newer versions (0.12.x, 0.13.x)?

> git describe --tags
cpp
-netlib-0.12.0-final-104-gb284b14


Public (boost/network/protocol/http/client/facade.hpp (current master, I suppose https://github.com/cpp-netlib/cpp-netlib/blob/master/boost/network/protocol/http/client/facade.hpp):
class basic_client_facade {
  typedef basic_client_impl<Tag, version_major, version_minor> pimpl_type;
public:


  /**
   * Clears the cache of resolved endpoints.
   */

 
void clear_resolved_cache() { pimpl->clear_resolved_cache(); }


Good thinking though, it must be my fault. :-)

Dean Michael Berris

unread,
Sep 7, 2018, 10:48:05 AM9/7/18
to cpp-n...@googlegroups.com


> On 8 Sep 2018, at 00:44, Lars Conrad <myl...@gmail.com> wrote:
>
> On Friday, September 7, 2018 at 4:31:28 PM UTC+2, Dean Michael Berris wrote:
> ... Can you say what version of the library you’re using, and where you’ve seen mention of using `clear_resolved_cache()` in any of the newer versions (0.12.x, 0.13.x)?
>
> > git describe --tags
> cpp-netlib-0.12.0-final-104-gb284b14
>

Ah, right — can you try the latest in the 0.13-release branch to see if this is still a problem?

>
> Public (boost/network/protocol/http/client/facade.hpp (current master, I suppose https://github.com/cpp-netlib/cpp-netlib/blob/master/boost/network/protocol/http/client/facade.hpp):
> class basic_client_facade {
> typedef basic_client_impl<Tag, version_major, version_minor> pimpl_type;
> public:
>
>
> /**
> * Clears the cache of resolved endpoints.
> */
> void clear_resolved_cache() { pimpl->clear_resolved_cache(); }
>
>
> Good thinking though, it must be my fault. :-)
>

This is a remnant of an older implementation, which had support for a caching resolver. Turns out that isn’t really a good idea to do in the HTTP client, but rather something that the underlying resolver should be handling.

If this is still there, we really ought to remove it as we don’t really support this anymore since we moved the default to the asynchronous internal implementation of the client.

Sorry for the confusion here.

Cheers

Lars Conrad

unread,
Sep 7, 2018, 11:02:20 AM9/7/18
to The C++ Network Library

Lars Conrad

unread,
Sep 7, 2018, 11:06:00 AM9/7/18
to The C++ Network Library
Btw., how do you pass your own 'resolution' to the client? Say that hostname 'example.com' resolves to 10.0.0.100-104 and you want to make sure that you NEVER connect to 10.0.0.103. How would you do that? Is there a way to pass the (resolved) endpoints to the client? Otherwise, this is a design error. You need the feature to 'intervene' there.

Dean Michael Berris

unread,
Sep 7, 2018, 11:06:21 AM9/7/18
to cpp-n...@googlegroups.com
It’s not really that difficult — you can also send a pull request to fix it too, which I’d be happy to merge. The “fix” would be do implement a no-op for the private implementation.

While you’re at it, let’s put a test there too that will exercise the code path and make sure it’s doing what we expect.

Cheers

Dean Michael Berris

unread,
Sep 7, 2018, 11:13:41 AM9/7/18
to cpp-n...@googlegroups.com


> On 8 Sep 2018, at 01:06, Lars Conrad <myl...@gmail.com> wrote:
>
> Btw., how do you pass your own 'resolution' to the client? Say that hostname 'example.com' resolves to 10.0.0.100-104 and you want to make sure that you NEVER connect to 10.0.0.103. How would you do that? Is there a way to pass the (resolved) endpoints to the client? Otherwise, this is a design error. You need the feature to 'intervene' there.
>

There’s a trade-off here which we decided pretty early on was not really important to address when we were doing this. Early versions of the library allowed for customising even the resolver through type-based trait resolution. Now we’ve largely moved away from that.

It would be nice to be able to do this, but it’s not easy to make it a simple API to do so. I suspect if we want to allow users to provide their own resolvers, we’d need to thread it through the client’s API somehow. We haven’t found the need to do that just yet as most of the use-cases have so far been really simple, relying on the underlying resolver that ASIO uses to “do the right thing”.

Now if you have suggestions on how to address this, I’m sure Glyn or I can make time to review the suggestion(s) and do reviews as well.

Unfortunately my availability to further work on this actively myself is very close to 0. But I’m happy to review pull requests.

Cheers

Lars Conrad

unread,
Sep 7, 2018, 11:16:01 AM9/7/18
to The C++ Network Library
I'm sorry. I honestly don't understand what you are trying to say - twice:
The “fix” would be do implement a no-op for the private implementation.
Why is it there/why would you let it there, even? Put an assert stating "deprecated/removed" there...

While you’re at it, let’s put a test there too that will exercise the code path and make sure it’s doing what we expect.
???

Dean Michael Berris

unread,
Sep 7, 2018, 11:19:53 AM9/7/18
to cpp-n...@googlegroups.com


> On 8 Sep 2018, at 01:16, Lars Conrad <myl...@gmail.com> wrote:
>
> I'm sorry. I honestly don't understand what you are trying to say - twice:
> The “fix” would be do implement a no-op for the private implementation.
> Why is it there/why would you let it there, even? Put an assert stating "deprecated/removed" there…

It’s a remnant of a previous implementation. Users upgrading from an older version to the newer one that used that API will encounter the failure you’ve encountered as well.

>
> While you’re at it, let’s put a test there too that will exercise the code path and make sure it’s doing what we expect.
> ???
>

Currently there’s no test that fails which indicates we either:

- Removed the only tests that ever exercised it (the synchronous client implementation)

- Forgot to implement the API for the delegate/pimpl.

In this case what we expect is that there will be no exceptions thrown and the test builds fine when calling this function.

Lars Conrad

unread,
Sep 7, 2018, 11:27:26 AM9/7/18
to The C++ Network Library
At version 0.anything developers expect changes. The trick is to let them know. Errors are better than silently ignoring it, I think.
Can you add an endpoint iterator to the client's constructor for skipping resolution? The level of encapsulation (=do it all or nothing) is too much otherwise. If at least you could provide the client's functionality separately. Then one could choose the 'one shot hits them all' (client) approach or pick each step/component separately instead.

Lars Conrad

unread,
Sep 10, 2018, 11:36:29 AM9/10/18
to The C++ Network Library
I'm having trouble diving through the code, as the IDEs can't see anything (I have to search for methods and symbols via file-path *lol*).
Is the resolver object being used for anything other than the query? If that were not the case, the resolver object could be replaced by the query result (object) = more efficient and versatile (as it could be populated upfront).

Dean Michael Berris

unread,
Sep 11, 2018, 11:05:10 PM9/11/18
to cpp-n...@googlegroups.com
The problem with that approach is that it pushes the burden of
resolving the endpoints to the users. It makes using the client more
complicated than it currently is, for a relatively uncommon use-case.
On Tue, Sep 11, 2018 at 1:36 AM Lars Conrad <myl...@gmail.com> wrote:
>
> I'm having trouble diving through the code, as the IDEs can't see anything (I have to search for methods and symbols via file-path *lol*).
> Is the resolver object being used for anything other than the query? If that were not the case, the resolver object could be replaced by the query result (object) = more efficient and versatile (as it could be populated upfront).
>

Lars Conrad

unread,
Sep 12, 2018, 12:19:26 AM9/12/18
to The C++ Network Library
You misunderstood what I meant or maybe I explained myself badly.
The client template/class has a resolver variable. If that variable isn't being used for anything other than the query (i.e. only calling the query method and then using that result), then this variable could be replaced with that result type instead. You would still do the query, but you could also skip it if you noticed that the variable (object) for the result isn't "empty". Otherwise, you are dragging along the resolver variable/object, which has served its purpose after the query has returned the result. The resolver would therefore only be of temporary use (an unnecessary variable).

Reply all
Reply to author
Forward
0 new messages