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

Method onDisconnected

examples/udp_echo_client.cpp:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 }
38
39 void onDisconnected() override
40 {
41 std::cout << "Echo UDP client disconnected a session with Id " << id() << std::endl;
42
43 // Wait for a while...
44 CppCommon::Thread::Sleep(1000);
45
46 // Try to connect again
47 if (!_stop)
48 ConnectAsync();
49 }
50
51 void onReceived(const asio::ip::udp::endpoint& endpoint, const void* buffer, size_t size) override
52 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected