Modified PubNub library to better utilize low bandwidth connections like a GSM modem. Instead of 10 socket connections sending 3 bytes only one is made and it sends all 30 bytes at the same time.

Fork of PubNub by PubNub

Revision:
7:55eb53c78b47
Parent:
5:cfcba723d245
diff -r 09d0a383fdde -r 55eb53c78b47 PubNub.h
--- a/PubNub.h	Tue May 20 11:43:18 2014 +0000
+++ b/PubNub.h	Wed Oct 01 11:36:11 2014 +0000
@@ -110,6 +110,10 @@
      * @param reply optional pointer for passing the returned reply (free() after use).
      * @return PNR_OK on success. */
     PubNubRes publish(const char *channel, const char *message, char **reply = NULL);
+    
+    /* Same as publish() but the user guarantees that the message is URL encoded already.
+     * This saves time compared to having to parse and convert the string every call. */
+    PubNubRes publish_urlenc(const char *channel, const char *message, char **reply = NULL);
 
     /** Subscribe API call
      *
@@ -197,10 +201,10 @@
     char m_timetoken[32];
     char *m_replybuf;
     int m_replylen;
-
+        
     /* Back-end post-processing of subscribe(). free()s *reply
      * in the process. */
     PubNubRes subscribe_processjson(char *reply, int replylen);
 };
 
-#endif
\ No newline at end of file
+#endif