SocketIO updated for K64F usage

Fork of SocketIO by Doug Anson

Revision:
9:4f02450a402a
Parent:
8:6948173ffe81
Child:
11:b32005b69b5c
--- a/SocketIO.cpp	Mon Jul 08 04:04:11 2013 +0000
+++ b/SocketIO.cpp	Mon Jul 08 04:15:03 2013 +0000
@@ -71,10 +71,10 @@
         char *json = this->prepareSocketIOJSONMessage(name,args,buffer);
         
         // send a heartbeat
-        this->ws->send("2:::");
+        bytesSent = this->ws->send("2::");
         
         // send the message
-        bytesSent = this->ws->send(json);
+        if (bytesSent > 0) bytesSent = this->ws->send(json);
     }
     
     return bytesSent;