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

Function OnConnection

test/pingpong/Server.cpp:27–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25static std::atomic_int count;
26
27void OnConnection(const Handle& handle, uint32_t error) {
28
29 count++;
30 if (error == CEC_SUCCESS) {
31 std::cout << " accept a socket. count: " << count << std::endl;
32 //SetNoDelay(handle);
33 }
34}
35
36void OnMessage(const Handle& handle, base::CBuffer* data, uint32_t, uint32_t error) {
37 char buff[65535];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected