MCPcopy Create free account
hub / github.com/SmingHub/Sming / wsConnected

Function wsConnected

samples/HttpServer_WebSockets/app/application.cpp:51–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void wsConnected(WebsocketConnection& socket)
52{
53 totalActiveSockets++;
54
55 //Use a global instance and add this new connection. Normally
56 userGeorge.addSession(socket);
57 // Notify everybody about new connection
58
59 String message = F("New friend arrived! Total: ") + String(totalActiveSockets);
60 socket.broadcast(message);
61}
62
63void wsMessageReceived(WebsocketConnection& socket, const String& message)
64{

Callers

nothing calls this directly

Calls 4

addSessionMethod · 0.80
FFunction · 0.50
StringClass · 0.50
broadcastMethod · 0.45

Tested by

no test coverage detected