Skip to content

Commit b02948f

Browse files
committed
Replaced the Handler template with std::function.
1 parent 4373fc1 commit b02948f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

http/src/network/http/v2/client/connection/async_resolver.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ namespace network {
4343
*/
4444
typedef resolver::iterator resolver_iterator;
4545

46+
/**
47+
* \typedef resolve_callback
48+
*/
49+
typedef std::function<void (const boost::system::error_code &,
50+
resolver_iterator)> resolve_callback;
51+
4652
/**
4753
* \brief Constructor.
4854
*/
@@ -66,8 +72,7 @@ namespace network {
6672
* \param port The port number.
6773
* \param callback A callback handler.
6874
*/
69-
template <class Handler>
70-
void async_resolve(const std::string &host, std::uint16_t port, Handler &&handler) {
75+
void async_resolve(const std::string &host, std::uint16_t port, resolve_callback handler) {
7176
if (cache_resolved_) {
7277
endpoint_cache::iterator it = endpoint_cache_.find(boost::to_lower_copy(host));
7378
if (it != endpoint_cache_.end()) {

0 commit comments

Comments
 (0)