Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing current observers on a resource #1109

Open
mikefoxTB opened this issue May 10, 2023 · 2 comments
Open

Listing current observers on a resource #1109

mikefoxTB opened this issue May 10, 2023 · 2 comments

Comments

@mikefoxTB
Copy link

Is it possible to get a list of observers for a given server resource? I'd like to know if the observer has acked confirmable notifications, current waiting time for ack etc., with enough information to prune the observer from the server based on lack of confirmations.

@mrdeep1
Copy link
Collaborator

mrdeep1 commented May 10, 2023

The resource and subscription are opaque structures to an application, and so an additional libcoap function would need to be created to get the sort of information you are looking for.

However, if the unsolicited responses from the server are confirmable, and there is no ACK response from the client for the (default) 4 retransmissions with exponentially increasing re-transmit times (default overall for all 4 retransmissions is 90 seconds), the CoAP response times out and the observe subscription is automatically deleted/pruned. Is this just what you need?

If you want to count active observe subscriptions, then you may be able to use coap_persist_track_funcs(3)

@mrdeep1
Copy link
Collaborator

mrdeep1 commented Jul 10, 2024

@mikefoxTB Do you need any more help here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants