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

Method onDisconnected

examples/tcp_chat_client.cpp:36–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }
35
36 void onDisconnected() override
37 {
38 std::cout << "Chat TCP client disconnected a session with Id " << id() << std::endl;
39
40 // Wait for a while...
41 CppCommon::Thread::Sleep(1000);
42
43 // Try to connect again
44 if (!_stop)
45 ConnectAsync();
46 }
47
48 void onReceived(const void* buffer, size_t size) override
49 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected