This is the Pubnub library for MBed2 ("classic") with the "sync" interface. It is based on the Pubnub C-core library.
Dependencies: Pubnub_c_core_mbed2_pal
Dependents: Pubnub_ATT_IoT_SK_WNC_sync pubnub_sync
pubnub_ntf_sync.h File Reference
This is the "sync" notification interface. More...
Go to the source code of this file.
Functions | |
enum pubnub_res | pubnub_await (pubnub_t *p) |
Waits, in a loop, for the current transaction to finish. |
Detailed Description
This is the "sync" notification interface.
Pubnub client library offers two "mostly portable" interfaces for getting notification about the outcome of a Pubnub transaction. Those are:
- sync (this one)
- callback
There are others, which are specific to a platform (like process events for Contiki OS). Also, not all platforms support the two "mostly portable" interfaces mentioned above.
Sync interfaces is the simplest. You just check for the (last) result of a context (by using pubnub_last_result()) and when it becomes something other than PNR_STARTED, you have your outcome.
Since pubnub_last_result() is part of the "Core API", this interface only provides one additional, helper function, which will wait in a loop for the transaction to finish. While pubnub_last_result() is available in all Pubnub client libraries, pubnub_await() is not.
Definition in file pubnub_ntf_sync.h.
Function Documentation
enum pubnub_res pubnub_await | ( | pubnub_t * | p ) |
Waits, in a loop, for the current transaction to finish.
Definition at line 93 of file pubnub_ntf_sync.cpp.
Generated on Thu Jul 28 2022 01:33:33 by 1.7.2