MCPcopy Create free account
hub / github.com/chronoxor/CppServer / onDisconnected

Method onDisconnected

examples/proto_client.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 void onDisconnected() override
46 {
47 std::cout << "Simple protocol client disconnected a session with Id " << id() << std::endl;
48
49 // Wait for a while...
50 CppCommon::Thread::Sleep(1000);
51
52 // Try to connect again
53 if (!_stop)
54 ConnectAsync();
55 }
56
57 void onError(int error, const std::string& category, const std::string& message) override
58 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected