more handlers
Dependents: bandwidth-meter-net mbedRail24v
Fork of Tiny-HTTPD by
Diff: HTTPD.h
- Revision:
- 1:5f009a651656
- Parent:
- 0:d18dff347122
- Child:
- 2:905fe8dfebd6
diff -r d18dff347122 -r 5f009a651656 HTTPD.h --- a/HTTPD.h Wed Nov 13 01:58:04 2013 +0000 +++ b/HTTPD.h Sat Feb 01 15:46:26 2014 +0000 @@ -20,14 +20,16 @@ #define HTTPD_H #include "mbed.h" -#include "rtos.h" -#include "EthernetInterface.h" +//#include "rtos.h" +//#include "EthernetInterface.h" +#include "TCPSocketServer.h" #include "CBuffer.h" //#define DEBUG #define HTTPD_PORT 80 -#define HTTPD_MAX_CLIENTS 2 +//#define HTTPD_MAX_CLIENTS 2 +#define HTTPD_MAX_CLIENTS 1 #define HTTPD_KEEPALIVE 10 #define HTTPD_TIMEOUT 15000 #define HTTPD_MAX_HANDLES 10 @@ -74,7 +76,7 @@ }; struct STATE { - Thread *thread; + //Thread *thread; TCPSocketConnection *client; volatile Request req; volatile Mode mode; @@ -98,6 +100,7 @@ HTTPD (); int start (int port = HTTPD_PORT); + void poll (); // --- HTTPD_req.cpp --- void httpdError (int id, int err); @@ -123,7 +126,7 @@ private : static HTTPD *_inst; - Thread *_daemon; + //Thread *_daemon; TCPSocketServer _server; #ifdef HTTPD_ENABLE_CLOSER