Skip to content

Commit ee6c197

Browse files
committed
Merge pull request sirleech#22 from fornellas/master
available() method
2 parents 7bb3d8a + 464e0fd commit ee6c197

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

WebServer.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ class WebServer: public Print
273273
virtual size_t write(const uint8_t *buffer, size_t size);
274274
size_t write(const char *data, size_t length);
275275

276+
// tells if there is anything to process
277+
uint8_t available();
278+
276279
private:
277280
EthernetServer m_server;
278281
EthernetClient m_client;
@@ -1175,6 +1178,10 @@ void WebServer::radioButton(const char *name, const char *val,
11751178
outputCheckboxOrRadio("radio", name, val, label, selected);
11761179
}
11771180

1181+
uint8_t WebServer::available(){
1182+
return m_server.available();
1183+
}
1184+
11781185
#endif // WEBDUINO_NO_IMPLEMENTATION
11791186

11801187
#endif // WEBDUINO_H_

0 commit comments

Comments
 (0)