-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Proper CoAP abstraction to match matrix-org/go-coap
#3
Comments
Block-wise transfer is also needed: matrix-org/matrix-spec-proposals#3079 (comment) |
I think the best plan, at this time, is to find a DTLS translator (to wrap This would allow a plethora of underlying transports, and makes it not tied to UDP like |
Some of my comments from the chat;
|
|
http://coap.technology/tools.html and https://coap.me/ could probably be used to test this. |
There seems to be sparse support for specific CoAP clients that matches matrix-org/go-coap, which has the following clauses;
coap
currently supports only plain UDP, Covertness/coap-rs#57 attempts to add DTLS to that. (for Covertness/coap-rs#16)udp_dtls
exists, but has last been updated in 2019 (and uses openssl)rustls
doesn't have DTLS support at the moment, but wants to implement it after DTLS 1.3 nears completion (rustls/rustls#40)The goal here is to have a CoAP implementation that "just works", doesn't block (and hopefully also neatly integrate with tokio/async), takes some notes from what the matrix.org team encountered when first experimenting with dtls+coap, and remove as many footguns and "leftovers" as possible (sending DTLS close on drop, etc.).
This'd probably mean forking repos and tracking commits in
Cargo.toml
, i'll fork the repos under my own namespace for the moment, until there's enough interest to move it to ruma's.This'll be the case until probably rustls supports DTLS, but we also have to be ready for a pure openssl-based implementation.
So, my proposal is this; make a sub-module (or crate) named
ruma-lb-coap
/ruma_lb::coap
that wraps and fixes all of these problems into an abstract and manageable interface, with exclusive featuresopenssl
and laterrustls
to have dependent crates select which backend to use.Have a
CoAPClient
in there, intended for internal plumbing (for now), that is able to open and closeCoAPClientSession
s to endpoints.The same happens for servers;
CoAPServer
andCoAPServerSession
.So in the end, it'd look something like this;
The text was updated successfully, but these errors were encountered: