user38880: I'm including this library "ESP8266WiFi.h" at the top of my sketch.
I can find documentation on WiFiServer.available(), but didn't find for WiFi.connected(), which is called in a server sketch after getting the client.
Clearly it's a test whether (once? I believe) the client is connected or not (and hasn't been explicitly closed in the server's side). It may seem obvious but some documented info would be helpful though.

user4628: You'll find it defined in WifiClient.h. The version I am using is, in WifiClient.cpp:
uint8_t WiFiClient::connected() {
  if (!_client)
    return 0;
  return _client->state() == ESTABLISHED || available();
}


38880: <p>I'm including this library "ESP8266WiFi.h" at the top of my sketch.
I can find documentation on <code>WiFiServer.available()</code>, but didn't find for <code>WiFi.connected()</code>, which is called in a server sketch after getting the client.</p>

<p>Clearly it's a test whether (once? I believe) the client is connected or not (and hasn't been explicitly closed in the server's side). It may seem obvious but some documented info would be helpful though.</p>
 4628: <p>You'll find it defined in <code>WifiClient.h</code>. The version I am using is, in <code>WifiClient.cpp</code>:</p>

<pre><code>uint8_t WiFiClient::connected() {
  if (!_client)
    return 0;
  return _client-&gt;state() == ESTABLISHED || available();
}
</code></pre>
