MCPcopy Create free account
hub / github.com/Tencent/embedx / InitRpcServer

Method InitRpcServer

src/graph/server/dist_graph_server.cc:94–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94bool 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 ';'

Callers

nothing calls this directly

Calls 2

shard_idMethod · 0.80
thread_numMethod · 0.45

Tested by

no test coverage detected