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

Inform application of transport related events #316

Open
chrysn opened this issue Aug 2, 2023 · 0 comments
Open

Inform application of transport related events #316

chrysn opened this issue Aug 2, 2023 · 0 comments

Comments

@chrysn
Copy link
Owner

chrysn commented Aug 2, 2023

There are some events that some transports can expose, most notably "the connection dropped", and which applications could be interested in.

Exposing them needs answers to three questions:

  1. How is this best done mechanically? Events on the .remote that the application can subscribe to, or events on the context? Is there a good Python idiom (async iterators?) that play well in both directions of cancellation?
  2. Which events are best exposed, and at what semantic level?

Currently I'm leaning toward only exposing "Connection unavailable", which in connected protocols would be indicated at shutdown, abortion or keepalive timeout, and on unconnected protocols on retransmission timeout exceeded.

Other possible events are "connection established", "ping received" or "CSM set", but see question 3.
3. Which events does it make sense to expose from a CoAP architecture PoV? Is there a danger of leading users towards patterns that only work on one transport?

(That's why I'm leaning toward only doing connection-lost: Something along those lines is present almost everywhere, and it can be described to be implemented in a best-effort way -- no guarantees it will fire when the peer goes down, only at some point after attempted communication.)

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

No branches or pull requests

1 participant