A simple web server that can be bound to either the EthernetInterface or the WiflyInterface.

Dependents:   Smart-WiFly-WebServer WattEye X10Svr SSDP_Server

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Sat Sep 14 22:41:20 2013 +0000
Parent:
19:7677fce798fa
Child:
21:660143f20b04
Commit message:
Reduce dependency on Wifly toward more standardized socket interface.

Changed in this revision

SW_HTTPServer.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SW_HTTPServer.cpp	Sat Sep 14 20:36:49 2013 +0000
+++ b/SW_HTTPServer.cpp	Sat Sep 14 22:41:20 2013 +0000
@@ -164,7 +164,7 @@
     int n;
     static unsigned int t_ref;       // reference point for the PerformanceTimer
 
-#if 1 || defined(DEBUG)
+#if defined(DEBUG)
     static state lastOp = Reset;
     if (lastOp != op) {
         const char *states[] = {"Idle", "Receiving", "Sending", "WaitingToClose", "Reset"};
@@ -253,7 +253,7 @@
 {
     if (bytes == -1)
         bytes = strlen(msg);
-    wifly->send(msg, bytes);
+    client.send((char *)msg, bytes);
 }