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

Function shutdownServer

samples/HttpServer_WebSockets/app/application.cpp:43–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void shutdownServer()
44{
45 // Don't shutdown immediately, wait a bit to allow messages to propagate
46 auto timer = new AutoDeleteTimer;
47 timer->initializeMs<1000>([&]() { server.shutdown(); });
48 timer->startOnce();
49}
50
51void wsConnected(WebsocketConnection& socket)
52{

Callers 2

wsMessageReceivedFunction · 0.85
processShutdownCommandFunction · 0.85

Calls 2

startOnceMethod · 0.80
shutdownMethod · 0.45

Tested by

no test coverage detected