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

Method ListPooledSockets

src/brpc/socket.cpp:2807–2818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2805}
2806
2807void Socket::ListPooledSockets(std::vector<SocketId>* out, size_t max_count) {
2808 out->clear();
2809 SharedPart* sp = GetSharedPart();
2810 if (sp == NULL) {
2811 return;
2812 }
2813 SocketPool* pool = sp->socket_pool.load(butil::memory_order_consume);
2814 if (pool == NULL) {
2815 return;
2816 }
2817 pool->ListSockets(out, max_count);
2818}
2819
2820bool Socket::GetPooledSocketStats(int* numfree, int* numinflight) {
2821 SharedPart* sp = GetSharedPart();

Callers 3

TEST_FFunction · 0.80
WatchConnectionsMethod · 0.80
PrintConnectionsMethod · 0.80

Calls 3

ListSocketsMethod · 0.80
clearMethod · 0.45
loadMethod · 0.45

Tested by 1

TEST_FFunction · 0.64