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:
- 41:6f2f1fb96742
- Parent:
- 40:02c49fadbb94
- Child:
- 42:0d5b682bb17a
diff -r 02c49fadbb94 -r 6f2f1fb96742 SW_HTTPServer.cpp --- a/SW_HTTPServer.cpp Mon Sep 01 22:05:52 2014 +0000 +++ b/SW_HTTPServer.cpp Wed Sep 03 09:32:17 2014 +0000 @@ -128,8 +128,12 @@ server = new TCPSocketServer(); server->bind(port); server->listen(); + #ifndef CC3000_H server->set_blocking(false, 10); client.set_blocking(false, 100); //@TODO client is separate from server. any way to combine? + #else + #warning CC3000 detected, using modified blocking settings + #endif ResetPerformanceData(); PerformanceTimer.start(); } @@ -291,6 +295,7 @@ { if (bytes == -1) bytes = strlen(msg); + INFO("Sending %d bytes", bytes); client.send((char *)msg, bytes); } @@ -473,7 +478,7 @@ { bool res; - res = server->close(); + res = client.close(); INFO("close connection returned %d", res); return res; }