mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-26 17:01:42 +03:00
Add facility for the removal of all queued messages and observations of a session. Apply it to client-side destination unreachable notification.
This commit is contained in:
1 parent
596b9a15a8
commit
6e97dbafcf
7 files changed
+98
-5
No files matched your search
@@ -95,6 +95,13 @@ void coap_session_release(coap_session_t *session);
|
||||
*/
|
||||
void coap_session_disconnected(coap_session_t *session);
|
||||
|
||||
/**
|
||||
* Notify session that the remote peer is no longer listening.
|
||||
*
|
||||
* @param session The CoAP session.
|
||||
*/
|
||||
void coap_session_reset(coap_session_t *session);
|
||||
|
||||
/**
|
||||
* Notify session that it has just connected or reconnected.
|
||||
*
|
||||
|
||||
+12
-2
@@ -447,11 +447,11 @@ coap_wait_ack( coap_context_t *context, coap_session_t *session,
|
||||
coap_queue_t *coap_find_transaction(coap_queue_t *queue, coap_session_t *session, coap_tid_t id);
|
||||
|
||||
/**
|
||||
* Cancels all outstanding messages for peer @p dst that have the specified
|
||||
* Cancels all outstanding messages for session @p session that have the specified
|
||||
* token.
|
||||
*
|
||||
* @param context The context in use.
|
||||
* @param dst Session of the messages to remove.
|
||||
* @param session Session of the messages to remove.
|
||||
* @param token Message token.
|
||||
* @param token_length Actual length of @p token.
|
||||
*/
|
||||
@@ -460,6 +460,16 @@ void coap_cancel_all_messages(coap_context_t *context,
|
||||
const unsigned char *token,
|
||||
size_t token_length);
|
||||
|
||||
/**
|
||||
* Cancels all outstanding messages for session @p session.
|
||||
*
|
||||
* @param context The context in use.
|
||||
* @param session Session of the messages to remove.
|
||||
*/
|
||||
void
|
||||
coap_cancel_session_messages(coap_context_t *context,
|
||||
coap_session_t *session);
|
||||
|
||||
/**
|
||||
* Dispatches the PDUs from the receive queue in given context.
|
||||
*/
|
||||
|
||||
@@ -344,6 +344,14 @@ int coap_delete_observer(coap_resource_t *resource,
|
||||
coap_session_t *session,
|
||||
const str *token);
|
||||
|
||||
/**
|
||||
* Removes any subscription for @p session and releases the allocated storage.
|
||||
*
|
||||
* @param context The CoAP context to use.
|
||||
* @param session The observer's session.
|
||||
*/
|
||||
void coap_delete_observers(coap_context_t *context, coap_session_t *session);
|
||||
|
||||
/**
|
||||
* Checks for all known resources, if they are dirty and notifies subscribed
|
||||
* observers.
|
||||
|
||||
Reference in new issue
Block a user