MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / TCPSocketPool

Method TCPSocketPool

net/pooled_socket.cpp:165–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164public:
165 TCPSocketPool(ISocketClient* client, uint64_t TTL_us,
166 bool client_ownership = false)
167 : ForwardSocketClient(client, client_ownership),
168 ev(photon::new_default_cascading_engine()),
169 TTL_us(TTL_us),
170 timer(TTL_us, {this, &TCPSocketPool::evict}) {
171 collector = (photon::thread*)photon::thread_enable_join(
172 photon::thread_create11(&TCPSocketPool::collect, this));
173 }
174
175 ~TCPSocketPool() override {
176 timer.stop();

Callers

nothing calls this directly

Calls 3

thread_enable_joinFunction · 0.85
thread_create11Function · 0.50

Tested by

no test coverage detected