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

Method onWSConnected

examples/ws_chat_server.cpp:21–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20protected:
21 void onWSConnected(const CppServer::HTTP::HTTPRequest& request) override
22 {
23 std::cout << "Chat WebSocket session with Id " << id() << " connected!" << std::endl;
24
25 // Send invite message
26 std::string message("Hello from WebSocket chat! Please send a message or '!' to disconnect the client!");
27 SendTextAsync(message);
28 }
29
30 void onWSDisconnected() override
31 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected