An example Constrained Application Protocol(CoAP) Server and client using rust-async-coap.
$ RUST_LOG=trace cargo +nightly run --bin coap-server
$ RUST_LOG=trace cargo +nightly run --bin coap-client
Some things to consider here:
- No clone exists for openssl::ssl::SslStream The only way this seemed to work well was to wrap it in an Arc with RwLock.
- DTLS v1.2 has no session ID A session can only live for the duration of a request. Perhaps with DTLS v1.3 this will change as this proposal will introduce the concept of a session ID.