| 92 | } |
| 93 | |
| 94 | bool DistGraphServer::InitRpcServer(const GraphConfig& config) { |
| 95 | vec_str_t ip_ports; |
| 96 | deepx_core::Split(config.ip_ports(), ";", &ip_ports); |
| 97 | if (ip_ports.empty()) { |
| 98 | DXERROR("Invalid graph server address: %s.", config.ip_ports().c_str()); |
| 99 | return false; |
| 100 | } |
| 101 | |
| 102 | deepx_core::TcpServerConfig tcp_config; |
| 103 | tcp_config.listen_endpoint = |
| 104 | deepx_core::MakeTcpEndpoint(ip_ports[config.shard_id()]); |
| 105 | tcp_config.thread = config.thread_num(); |
| 106 | rpc_server_.set_config(tcp_config); |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | // The last declaration of DistGraphServer::Name() function is to avoid compile |
| 111 | // warning of extra ';' |
nothing calls this directly
no test coverage detected