| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | subscribe_center(url_sub_queue, &get<2>(*b)); |
| | | |
| | | // temporary |
| | | port = 0; |
| | | // port = 0; |
| | | start_reply(get<8>(*b), port, &get<6>(*b)); |
| | | |
| | | return b; |
| | |
| | | |
| | | 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("======>> bus_query_topic_address 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("======>> bus_query_topic_address use remote address %s\n", url.c_str()); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | return simple_request(url, topics, topics_len, reply, reply_len, timeout_ms); |
| | | } |
| | |
| | | |
| | | 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("======>> bus_query_procs 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("======>> bus_query_procs use remote address %s\n", url.c_str()); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | return simple_request(url, query, query_len, reply, reply_len, timeout_ms); |
| | | } |