| | |
| | | unsigned short port = *(unsigned short*)(out); |
| | | copy_memory(reply, reply_len, (char*)out + port_size, out_len - port_size); |
| | | BHFree(out, out_len); |
| | | printf("======>> recv port %d\n", port); |
| | | ///////////////////////////////////////////////////////////////////////// |
| | | |
| | | const auto& url_pub_proxy = get_url(URLPubProxy); |
| | |
| | | const auto& url_hb = get_url(URLHeartBeat); |
| | | respond_survey(url_hb, string{(const char*)proc_info, (const size_t)proc_info_len}); |
| | | |
| | | start_reply(pi.proc_id(), 0); |
| | | start_reply(pi.proc_id(), port); |
| | | } |
| | | return ret; |
| | | } |
| | |
| | | get<1>(get<1>(rep->socks_)) = port; |
| | | ipc = "tcp://0.0.0.0:" + to_string(port); |
| | | if(create_server(&get<0>(get<1>(rep->socks_)), ipc, 62, rep) != 0) return -1; |
| | | printf("======>> create server for remote port %d\n", port); |
| | | }else { |
| | | get<0>(get<1>(rep->socks_)).id = numeric_limits<int32_t>::max(); |
| | | } |