SocketIO updated for K64F usage

Fork of SocketIO by Doug Anson

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Thu Oct 09 16:13:12 2014 +0000
Parent:
12:8fe60d9ca3bf
Commit message:
updates for K64F

Changed in this revision

SocketIO.cpp Show annotated file Show diff for this revision Revisions of this file
SocketIO.h Show annotated file Show diff for this revision Revisions of this file
diff -r 8fe60d9ca3bf -r 1b8ff174aea6 SocketIO.cpp
--- a/SocketIO.cpp	Sun Nov 10 02:17:45 2013 +0000
+++ b/SocketIO.cpp	Thu Oct 09 16:13:12 2014 +0000
@@ -175,13 +175,13 @@
 bool SocketIO::acquireSessionKey() {
     bool haveKey = false;
     HTTPClient http;
-    char response[513];
-    memset(response,'\0',513);
+    char response[SOCKETIO_MESSAGE_LENGTH+1];
+    memset(response,0,SOCKETIO_MESSAGE_LENGTH+1);
     
     // make sure we have buffers
     if (this->session_key != NULL && this->ws_channel != NULL) {
         // request our session key
-        int nread = http.get(this->url_session_key,response,512);
+        int nread = http.get(this->url_session_key,response,SOCKETIO_MESSAGE_LENGTH);
         
         // parse the session key
         if (!nread)         
diff -r 8fe60d9ca3bf -r 1b8ff174aea6 SocketIO.h
--- a/SocketIO.h	Sun Nov 10 02:17:45 2013 +0000
+++ b/SocketIO.h	Thu Oct 09 16:13:12 2014 +0000
@@ -37,7 +37,8 @@
 #define DEFAULT_VERSION         1
 
 // Default SocketIO message length (suggestion only...)
-#define SOCKETIO_MESSAGE_LENGTH 512
+#define SOCKETIO_MESSAGE_LENGTH 768
+#define TARGET_K64F             true
 
 // HTTP support for session key retrieval
 #include "HTTPClient.h"