mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-23 07:35:13 +03:00
keepalive: Add in server keepalive support
If coap_context_set_keepalive() is set in the server, CoAP keepalive packets will get sent for any CoAP session that is curently observing a resource. If the keepalive times out, then the observation(s) are canceled and the server session is deleted.
This commit is contained in:
1 parent
080da9a843
commit
4d84859620
8 files changed
+83
-12
No files matched your search
@@ -2563,6 +2563,7 @@ main(int argc, char **argv) {
|
||||
coap_mcast_per_resource(ctx);
|
||||
coap_context_set_block_mode(ctx, block_mode);
|
||||
coap_context_set_max_block_size(ctx, max_block_size);
|
||||
coap_context_set_keepalive(ctx, 30);
|
||||
if (csm_max_message_size)
|
||||
coap_context_set_csm_max_message_size(ctx, csm_max_message_size);
|
||||
if (doing_tls_engine) {
|
||||
|
||||
Reference in new issue
Block a user