A simple web server that can be bound to either the EthernetInterface or the WiflyInterface.
Dependents: Smart-WiFly-WebServer WattEye X10Svr SSDP_Server
Diff: SW_HTTPServer.cpp
- Revision:
- 56:df915cb8ba9a
- Parent:
- 55:238dd90b6fb3
- Child:
- 57:fb81057b4d77
diff -r 238dd90b6fb3 -r df915cb8ba9a SW_HTTPServer.cpp --- a/SW_HTTPServer.cpp Mon Jul 02 17:31:05 2018 +0000 +++ b/SW_HTTPServer.cpp Tue Jul 10 03:06:32 2018 +0000 @@ -12,7 +12,7 @@ // #include "mbed.h" -//#define DEBUG "HTTP" +#define DEBUG "HTTP" #include <cstdio> #if (defined(DEBUG) && !defined(TARGET_LPC11U24)) #define DBG(x, ...) std::printf("[DBG %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); @@ -152,8 +152,8 @@ server = new TCPSocketServer(); server->bind(port); server->listen(5); - server->set_blocking(false, blockingtime); - client.set_blocking(false, blockingtime); //@TODO client is separate from server. any way to combine? + server->set_blocking(true, blockingtime); + client.set_blocking(true, blockingtime); //@TODO client is separate from server. any way to combine? ResetPerformanceData(); PerformanceTimer.start(); }