mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
This ESP8266HTTPUpdateServer can be instantiated and used more cleanly, it's also able to take or create an ESP8266WebServer to configure the events and /update handler. It's been made more robust by handling upload abort, which depends on fix provided for issue #833
19 lines
347 B
C++
19 lines
347 B
C++
#ifndef __HTTP_UPDATE_SERVER_H
|
|
#define __HTTP_UPDATE_SERVER_H
|
|
|
|
class ESP8266WebServer;
|
|
|
|
class ESP8266HTTPUpdateServer
|
|
{
|
|
private:
|
|
bool _serial_output;
|
|
ESP8266WebServer *_server;
|
|
static const char *_serverIndex;
|
|
public:
|
|
ESP8266HTTPUpdateServer(bool serial_debug=false);
|
|
void setup(ESP8266WebServer *server=NULL);
|
|
};
|
|
|
|
|
|
#endif
|