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

Method OnConnection

test/http/HttpServer.cpp:19–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19void CHttpServer::OnConnection(const cppnet::Handle& handle, uint32_t err) {
20 if (err == CEC_SUCCESS) {
21 std::unique_lock<std::mutex> lock(_mutex);
22 if (_context_map.find(handle) == _context_map.end()) {
23 _context_map[handle] = CHttpContext();
24 }
25 }
26}
27
28void CHttpServer::OnMessage(const cppnet::Handle& handle, base::CBuffer* data,
29 uint32_t, uint32_t err) {

Callers

nothing calls this directly

Calls 1

CHttpContextClass · 0.85

Tested by

no test coverage detected