Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By Dirkblaze
#80013 Playing with a server running on NodeMCU ESP8266. Working OK, but

(1) Why do I need to client.stop() every time I process a request? On the next request I resend all the style and HTML to the same client!

so

(2) using ESP8266WiFi and WiFiServer and WiFiClient how can I identify the INDIVIDUAL client, see the IP, for instance. I'd like to be able to send shorter message to a client who's still on the page I've already sent with all its content.

So, for instance, instead of repainting the entire screen, I could just send enough HTML to pop up a new Div on his screen, using style sheet already defined.

(3) in general, what are the interesting attributes of the WiFiClient that can tell me MORE about the client? Like maybe, browser, device, IP etc. Of course, I know about the methods like
client.connected, client.available, client.read... etc

Thanks for any help!

Not positive this is the place to post this: long time reader, first time poster!
User avatar
By martinayotte
#80078
Dirkblaze wrote:I'd like to be able to send shorter message to a client who's still on the page I've already sent with all its content.

It is not the way HTML request are working ...
If you wish to do some refresh within a current page, you have to do some ajax/jquery call from javascript provided inside your page.