From f7c4658c884629e79a9ce98052e19f8a68abdf22 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期五, 14 一月 2022 09:40:13 +0800 Subject: [PATCH] performance --- src/bn_api.cpp | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/bn_api.cpp b/src/bn_api.cpp index 00cee5b..90e74ca 100644 --- a/src/bn_api.cpp +++ b/src/bn_api.cpp @@ -131,15 +131,15 @@ auto url(get_url(URLQueryTopic)); - if (remote && remote_len > 0){ - BHAddress addr; - if (addr.ParseFromArray(remote, remote_len)){ - if (!addr.ip().empty() && addr.port() > 0){ - // url = "tcp://" + addr.ip() + ":" + to_string(addr.port()); - printf("======>> BHQueryTopicAddress use remote address %s\n", url.c_str()); - } - } - } + // if (remote && remote_len > 0){ + // BHAddress addr; + // if (addr.ParseFromArray(remote, remote_len)){ + // if (!addr.ip().empty() && addr.port() > 0){ + // // url = "tcp://" + addr.ip() + ":" + to_string(addr.port()); + // printf("======>> BHQueryTopicAddress use remote address %s\n", url.c_str()); + // } + // } + // } return simple_request(url, topic, topic_len, reply, reply_len, timeout_ms); } @@ -157,15 +157,15 @@ auto url(get_url(URLQueryProcs)); - if (remote && remote_len > 0){ - BHAddress addr; - if (addr.ParseFromArray(remote, remote_len)){ - if (!addr.ip().empty() && addr.port() > 0){ - // url = "tcp://" + addr.ip() + ":" + to_string(addr.port()); - printf("======>> BHQueryProcs use remote address %s\n", url.c_str()); - } - } - } + // if (remote && remote_len > 0){ + // BHAddress addr; + // if (addr.ParseFromArray(remote, remote_len)){ + // if (!addr.ip().empty() && addr.port() > 0){ + // // url = "tcp://" + addr.ip() + ":" + to_string(addr.port()); + // printf("======>> BHQueryProcs use remote address %s\n", url.c_str()); + // } + // } + // } return simple_request(url, query, query_len, reply, reply_len, timeout_ms); } -- Gitblit v1.8.0