MCPcopy Create free account
hub / github.com/caozhiyi/CppNet / RemoveSocket

Method RemoveSocket

net/CppNetImpl.cpp:257–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257bool CCppNetImpl::RemoveSocket(uint64_t handle) {
258 std::unique_lock<std::mutex> lock(_mutex);
259 auto iter = _socket_map.find(handle);
260 if (iter != _socket_map.end()) {
261 _socket_map.erase(iter);
262 return true;
263 }
264 return false;
265}
266
267uint32_t CCppNetImpl::GetThreadNum() {
268 return (uint32_t)_thread_vec.size();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected