SimpleSocket 1.0 examples

Dependencies:   EthernetNetIf SimpleSocket 1.0 mbed

Revision:
34:a108bcc26b69
Parent:
33:39d9cdf99de8
Child:
35:3fc65b5d6340
--- a/webserver.cpp	Wed Nov 02 12:16:51 2011 +0000
+++ b/webserver.cpp	Fri Nov 04 06:04:36 2011 +0000
@@ -12,12 +12,13 @@
     "</head>\r\n"
     "<body>\r\n"
     "<h2>Analog Input</h2>\r\n"
-    "<table cellpadding=\"5\">";
+    "<table cellpadding=\"5\">\r\n";
 char *response1 = 
     "<tr style=\"background:#ccccff\">"
     "<th>pin</th><th>value</th>"
     "</tr>\r\n";
-char *response2 = "<tr style=\"background:#cccccc\">"
+char *response2 =
+    "<tr style=\"background:#cccccc\">"
     "<td>p%d</td><td align=\"center\">%f</td>"
     "</tr>\r\n";
 char *response3 =
@@ -28,7 +29,9 @@
 void webserver() {
     EthernetNetIf eth;
     eth.setup();
+    
     ServerSocket server(80);
+    
     while (true) {
         ClientSocket socket = server.accept();
         while (socket) {