27 class WebSocketsServer;
37 #ifdef ENABLE_AUTHENTICATION
54 void print(
const char *data);
60 WebServer * _webserver;
73 static bool _setupdone;
74 static WebServer * _webserver;
75 static long _id_connection;
76 static WebSocketsServer * _socket_server;
77 static uint16_t _port;
78 static uint16_t _data_port;
79 static String _hostname;
80 static uint8_t _upload_status;
81 static char * mac2str (uint8_t mac [8]);
82 static String formatBytes (uint32_t bytes);
83 static String getContentType (String filename);
84 static String get_Splited_Value(String data,
char separator,
int index);
86 #ifdef ENABLE_AUTHENTICATION
87 static auth_ip * _head;
88 static uint8_t _nb_ip;
89 static bool AddAuthIP (auth_ip * item);
90 static char * create_session_ID();
91 static bool ClearAuthIP (IPAddress ip,
const char * sessionID);
92 static auth_ip * GetAuth (IPAddress ip,
const char * sessionID);
94 static bool isLocalPasswordValid (
const char * password);
96 static String get_param (String & cmd_params,
const char *
id,
bool withspace);
99 static void handle_SSDP ();
101 static void handle_root();
102 static void handle_login();
103 static void handle_not_found ();
104 static void handle_web_command ();
105 static void handle_web_command_silent ();
106 static void handle_Websocket_Event(uint8_t num, uint8_t type, uint8_t * payload,
size_t length);
107 static void SPIFFSFileupload ();
108 static void handleFileList ();
109 static void handleUpdate ();
110 static void WebUpdateUpload ();
111 #if ENABLED(SDSUPPORT)
112 static void handle_direct_SDFileList();
113 static void SDFile_direct_upload();