Websocket Hello World over an ethernet network

Dependencies:   EthernetNetIf mbed DNSResolver

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Tue Oct 25 06:57:32 2011 +0000
Parent:
4:e8d0d258834b
Child:
6:aa2b63dc24f3
Commit message:

Changed in this revision

Websocket.lib Show annotated file Show diff for this revision Revisions of this file
Wifly.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Websocket.lib	Thu Sep 01 13:17:08 2011 +0000
+++ b/Websocket.lib	Tue Oct 25 06:57:32 2011 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/samux/code/Websocket/#c5ac3e26998f
+http://mbed.org/users/samux/code/Websocket/#ca8c5ad59850
--- a/Wifly.lib	Thu Sep 01 13:17:08 2011 +0000
+++ b/Wifly.lib	Tue Oct 25 06:57:32 2011 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/samux/code/Wifly/#984c1436dd42
+http://mbed.org/users/samux/code/Wifly/#92ee976db7b9
--- a/main.cpp	Thu Sep 01 13:17:08 2011 +0000
+++ b/main.cpp	Tue Oct 25 06:57:32 2011 +0000
@@ -6,7 +6,7 @@
 
 ADXL345 accelerometer(p5, p6, p7, p8);
 
-//Here, we create a Websocket instance in 'w' (write) mode
+//Here, we create a Websocket instance in 'wo' (write) mode
 //on the 'samux' channel
 Websocket ws("ws://sockets.mbed.org/ws/samux/wo");
 
@@ -45,7 +45,7 @@
             //Here, we format the string we will be sending to the server
             //the format we are sending in is JSON
             sprintf(json_str, "{\"id\":\"wifly_acc\",\"ax\":\"%d\",\"ay\":\"%d\",\"az\":\"%d\"}", (int16_t)readings[0], (int16_t)readings[1], (int16_t)readings[2]);
-            ws.Send(json_str);
+            ws.send(json_str);
         }
     }
 }
\ No newline at end of file