mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-03 03:01:05 +03:00
Observe: Support disabling observe cancellation on session close
Add in a new function coap_session_set_no_observe_cancel() to support this.
This commit is contained in:
1 parent
bc4c75060b
commit
0f0cac71f5
6 files changed
+30
-5
No files matched your search
@@ -614,4 +614,11 @@ uint32_t coap_session_get_probing_rate(const coap_session_t *session);
|
||||
*/
|
||||
coap_mid_t coap_session_send_ping(coap_session_t *session);
|
||||
|
||||
/**
|
||||
* Disable client automatically sending observe cancel on session close
|
||||
*
|
||||
* @param session The CoAP session.
|
||||
*/
|
||||
void coap_session_set_no_observe_cancel(coap_session_t *session);
|
||||
|
||||
#endif /* COAP_SESSION_H */
|
||||
@@ -145,6 +145,8 @@ struct coap_session_t {
|
||||
uint8_t doing_first; /**< Set if doing client's first request */
|
||||
uint8_t proxy_session; /**< Set if this is an ongoing proxy session */
|
||||
uint8_t delay_recursive; /**< Set if in coap_client_delay_first() */
|
||||
uint8_t no_observe_cancel; /**< Set if do not cancel observe on session
|
||||
close */
|
||||
uint32_t tx_rtag; /**< Next Request-Tag number to use */
|
||||
uint64_t tx_token; /**< Next token number to use */
|
||||
coap_bin_const_t *last_token; /** last token used to make a request */
|
||||
|
||||
Reference in new issue
Block a user