Clinton Lee Taylor / Mbed 2 deprecated WiFiLamp

Dependencies:   ESP8266_WebServer mbed

Fork of WiFiLamp by Sebastian Schocke

Committer:
sschocke
Date:
Thu Dec 18 16:06:10 2014 +0000
Revision:
7:f15c81074400
Parent:
5:42c6f9d916bc
Child:
9:319aeb6e0123
Moved all current WebServer functionality to ESP8266_WebServer class

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sschocke 5:42c6f9d916bc 1 #include "mbed.h"
sschocke 7:f15c81074400 2 #include <string>
sschocke 5:42c6f9d916bc 3
sschocke 5:42c6f9d916bc 4 #ifndef _ESP8266_WEB_SERVER_H
sschocke 5:42c6f9d916bc 5 #define _ESP8266_WEB_SERVER_H
sschocke 5:42c6f9d916bc 6
sschocke 5:42c6f9d916bc 7 class ESP8266_WebServer
sschocke 5:42c6f9d916bc 8 {
sschocke 7:f15c81074400 9 Serial *serial;
sschocke 7:f15c81074400 10 char buffer[1024];
sschocke 7:f15c81074400 11 char reply[1024];
sschocke 7:f15c81074400 12 char response[2048];
sschocke 7:f15c81074400 13 char httpMethod[64];
sschocke 7:f15c81074400 14 char httpURI[512];
sschocke 7:f15c81074400 15 char* rxptr;
sschocke 5:42c6f9d916bc 16
sschocke 7:f15c81074400 17 private:
sschocke 7:f15c81074400 18 short data_waiting(void);
sschocke 7:f15c81074400 19 short string_waiting(const char*);
sschocke 7:f15c81074400 20 void readBuffer(void);
sschocke 7:f15c81074400 21 void sendResponse(int linkID);
sschocke 7:f15c81074400 22 public:
sschocke 7:f15c81074400 23 int LinkID;
sschocke 7:f15c81074400 24 std::string Method;
sschocke 7:f15c81074400 25 std::string URI;
sschocke 7:f15c81074400 26 Serial *debugSerial;
sschocke 7:f15c81074400 27
sschocke 7:f15c81074400 28 ESP8266_WebServer(Serial *espUART);
sschocke 7:f15c81074400 29 void rxint(void);
sschocke 7:f15c81074400 30 void Initialize(void);
sschocke 7:f15c81074400 31 bool GetRequest(void);
sschocke 7:f15c81074400 32 void SendHTMLReply(int linkID, std::string reply);
sschocke 7:f15c81074400 33 void Send404Reply(int linkID);
sschocke 7:f15c81074400 34 };
sschocke 7:f15c81074400 35
sschocke 5:42c6f9d916bc 36 #endif