A simple web server that can be bound to either the EthernetInterface or the WiflyInterface.
Dependents: Smart-WiFly-WebServer WattEye X10Svr SSDP_Server
Revision 41:6f2f1fb96742, committed 2014-09-03
- Comitter:
- Sissors
- Date:
- Wed Sep 03 09:32:17 2014 +0000
- Parent:
- 40:02c49fadbb94
- Child:
- 42:0d5b682bb17a
- Commit message:
- CC3000 support (modified some blocking for it, required for rev 46), fixed close connection, added a debug message in send command.
Changed in this revision
SW_HTTPServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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; }