Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Pubnub_c_core by
pubnub_timers.h File Reference
This is the "Timer" API of the Pubnub client library. More...
Go to the source code of this file.
Functions | |
| int | pubnub_set_transaction_timeout (pubnub_t *p, int duration_ms) |
| Sets the transaction timeout for the context. | |
| int | pubnub_transaction_timeout_get (pubnub_t *p) |
| Returns the current transaction timeout for the context. | |
Detailed Description
This is the "Timer" API of the Pubnub client library.
Functions here influence the way that Pubnub client library works with lower levels (the TCP/IP stack) with respect to how much will an operation be waited upon to complete.
It is available in most platforms, but the exact way it behaves may have noticable differences. In general, the actual timeout will be _at_ _least_ as the specified by the user, but, it may actually be more.
Definition in file pubnub_timers.h.
Function Documentation
| int pubnub_set_transaction_timeout | ( | pubnub_t * | p, |
| int | duration_ms | ||
| ) |
Sets the transaction timeout for the context.
This will be used for all subsequent transactions. If a transactions is ongoing and its timeout can be changed, it will be, but if it can't, that would not be reported as an error.
Pubnub SDKs, in general, distinguish the "subscribe" timeout and other transactions, but, C-core doesn't, to save space, as most contexts are either used for subscribe or for other transactions.
If timer support is available, pubnub_init() will set a default timeout, which is configurable at compile time. So, if the default timeout is fine with you, you don't have to call this function.
- Precondition:
- Call this after pubnub_init() on the context
- duration_ms > 0
- Parameters:
-
p The Context to set transaction timeout for duration_ms Duration of the timeout, in milliseconds
- Returns:
- 0: OK, otherwise: error, timers not supported
Definition at line 8 of file pubnub_timers.cpp.
| int pubnub_transaction_timeout_get | ( | pubnub_t * | p ) |
Returns the current transaction timeout for the context.
- Precondition:
- Call this after pubnub_init() on the context
- Parameters:
-
p The Context for which to get the transaction timeout
- Returns:
- Current transaction timeout, in milliseconds (should always be > 0)
Definition at line 17 of file pubnub_timers.cpp.
Generated on Wed Jul 13 2022 10:22:25 by
1.7.2
