Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb02948f

Browse files
committed
Replaced the Handler template with std::function.
1 parent4373fc1 commitb02948f

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<classHandler>
70-
voidasync_resolve(const std::string &host, std::uint16_t port, Handler &&handler) {
75+
voidasync_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)

[8]ページ先頭

©2009-2025 Movatter.jp