These are chat archives for SmingHub/Sming
@all, question about start/stop WWW/(TCP) servers:
in examples I can see such code:
if (serverStarted) return;
server.listen(80); server.addPath("/", onIndex); server.addPath("/config", onConfiguration); server.addPath("/config.json", onConfiguration_json); server.addPath("/state", onAJAXGetState); server.setDefaultHandler(onFile); serverStarted = true;
what about STOPPING server (deregistering handlers)?
ex I use "WebConfig" (with AP started) if there is NO connection, then can config my WiFi as client, stop AP. What about WWW server I started having no connection? I can't "see" WWW on Client address, should I somehow close server? [I want to start "next" server, with different content on Client address.