These are chat archives for SmingHub/Sming

10th
Jan 2017
laurentppol
@laurentppol
Jan 10 2017 07:14
ANyone "home"?

@all, question about start/stop WWW/(TCP) servers:
in examples I can see such code:

void startWebServer()
{
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.

crosofg
@crosofg
Jan 10 2017 08:15
@/all
what are the reasons for esp geting reset?
laurentppol
@laurentppol
Jan 10 2017 08:16
loop in "main" (de facto initialization) code?
crosofg
@crosofg
Jan 10 2017 08:22
no loop
anywhere
crosofg
@crosofg
Jan 10 2017 08:37
TcpConnection::staticOnReceive: pbuf is NULL
when does this come
there is frequent disconnection with my mqtt server
due to this