MCPcopy Create free account
hub / github.com/apache/brpc / GetSocketFromServer

Method GetSocketFromServer

test/brpc_rdma_unittest.cpp:154–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 Socket* GetSocketFromServer(size_t index) {
155 std::vector<SocketId> sids;
156 _server._am->ListConnections(&sids);
157 if (index >= sids.size()) {
158 return NULL;
159 }
160 SocketUniquePtr s;
161 if (Socket::Address(sids[index], &s) == 0) {
162 return s.get();
163 }
164 return NULL;
165 }
166
167 butil::TempFile _server_list;
168 std::string _naming_url;

Callers

nothing calls this directly

Calls 3

ListConnectionsMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected