Build Realtime Apps With The Real-Time Network - the mbed PubNub API+SDK
Dependents: PubNubDemo Cellular_PubNubDemo lpc4088_ebb_ublox_Cellular_PubNubDemo PubNubDemo_LPC4088 ... more
Fork of PubNub by
The PubNub library enables your mbed board to communicate with the world via the PubNub cloud messaging system.
The library provides a PubNub class that is tied to a particular set of keys and offers methods that correspond to the appropriate API methods - publish, subscribe, history, etc. The JSON encoded messages are passed as raw strings to conserve memory, but at your option, you can use e.g. picojson library to deal with JSON. The API is synchronous - use multiple rtos threads to talk to PubNub on the background.
Getting Started
Can't wait to try it out? Connect your mbed application board and proceed to the demo project:
Import programPubNubDemo
Reference demo of the PubNub library for the mbed application board - control your board over the internet!
Library Usage
Import library
Public Member Functions |
|
| PubNub (const char *publish_key, const char *subscribe_key, const char *origin="http://pubsub.pubnub.com") | |
|
Init a Pubnub Client context.
|
|
| PubNubRes | publish (const char *channel, const char *message, char **reply=NULL) |
|
Publish API call.
|
|
| PubNubRes | subscribe (const char *channel, char **reply) |
|
Subscribe API call.
|
|
| PubNubRes | history (const char *channel, char **reply, int *replysize, int limit=10) |
|
History API call.
|
|
| PubNubRes | time (char *ts) |
|
Time API call.
|
|
Revision 8:c9f79982b5ca, committed 2014-11-20
- Comitter:
- pasky
- Date:
- Thu Nov 20 21:30:10 2014 +0000
- Parent:
- 7:a7bbafe53f2d
- Parent:
- 6:09d0a383fdde
- Commit message:
- Merge
Changed in this revision
| PubNub.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PubNub.cpp Wed Nov 19 21:39:14 2014 +0000 +++ b/PubNub.cpp Thu Nov 20 21:30:10 2014 +0000 @@ -1,7 +1,7 @@ #include <cstring> #include "mbed.h" -#include "EthernetInterface.h" +#include "TCPSocketConnection.h" #include "PubNub.h"
--- a/PubNub.h Wed Nov 19 21:39:14 2014 +0000 +++ b/PubNub.h Thu Nov 20 21:30:10 2014 +0000 @@ -23,7 +23,7 @@ */ /** \file -PubNub Client header file +PubNub Client header file */ #ifndef PubNub_h
PubNub


