mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-28 01:27:09 +03:00
Merge pull request #795 from mrdeep1/async_fix
async: Handle changes to delay when using epoll
This commit is contained in:
10 files changed
+130
-65
No files matched your search
+12
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* async.h -- state management for asynchronous messages
|
||||
*
|
||||
* Copyright (C) 2010-2011 Olaf Bergmann <bergmann@tzi.org>
|
||||
* Copyright (C) 2010-2022 Olaf Bergmann <bergmann@tzi.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
@@ -71,6 +71,17 @@ coap_register_async(coap_session_t *session,
|
||||
void
|
||||
coap_async_set_delay(coap_async_t *async, coap_tick_t delay);
|
||||
|
||||
/**
|
||||
* Trigger the registered @p async.
|
||||
*
|
||||
* A copy of the original request will get sent to the appropriate request
|
||||
* handler.
|
||||
*
|
||||
* @param async The async object to trigger.
|
||||
*/
|
||||
void
|
||||
coap_async_trigger(coap_async_t *async);
|
||||
|
||||
/**
|
||||
* Releases the memory that was allocated by coap_register_async() for the
|
||||
* object @p async.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* coap_io.h -- Default network I/O functions for libcoap
|
||||
*
|
||||
* Copyright (C) 2012-2013 Olaf Bergmann <bergmann@tzi.org>
|
||||
* Copyright (C) 2012-2022 Olaf Bergmann <bergmann@tzi.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
@@ -97,6 +97,14 @@ coap_socket_read(coap_socket_t *sock, uint8_t *data, size_t data_len);
|
||||
void
|
||||
coap_epoll_ctl_mod(coap_socket_t *sock, uint32_t events, const char *func);
|
||||
|
||||
/**
|
||||
* Update the epoll timer fd as to when it is to trigger.
|
||||
*
|
||||
* @param context The context to update the epoll timer on.
|
||||
* @param delay The time to delay before the epoll timer fires.
|
||||
*/
|
||||
void coap_update_epoll_timer(coap_context_t *context, coap_tick_t delay);
|
||||
|
||||
#ifdef WITH_LWIP
|
||||
ssize_t
|
||||
coap_socket_send_pdu( coap_socket_t *sock, coap_session_t *session,
|
||||
|
||||
Reference in new issue
Block a user