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

Method Find

src/brpc/socket_map.cpp:343–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343int SocketMap::Find(const SocketMapKey& key, SocketId* id) {
344 BAIDU_SCOPED_LOCK(_mutex);
345 SingleConnection* sc = _map.seek(key);
346 if (sc) {
347 *id = sc->socket->id();
348 return 0;
349 }
350 return -1;
351}
352
353void SocketMap::List(std::vector<SocketId>* ids) {
354 ids->clear();

Callers 1

SocketMapFindFunction · 0.45

Calls 2

seekMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected