Covertness / coap-rs

A Constrained Application Protocol(CoAP) library implemented in Rust.
MIT License
209 stars 48 forks source link

Async client requests #29

Closed weili-jiang closed 7 months ago

weili-jiang commented 5 years ago

It appears that the underlying IO library is asynchronous, and the server implementation does indeed expose an asynchronous handler interface.

It would be nice if the client side could also be made to have an asynchronous interface rather than having to do a blocking read.

Covertness commented 5 years ago

Can you tell me what would you do with the async client request ? I think the blocking request is enough for most clients

weili-jiang commented 5 years ago

It would be to free up the main thread to perform other asynchronous IO. I realise that this can also be done externally by wrapping it with something like a futures pool (or simply a worker thread pool)...

Covertness commented 7 months ago

https://github.com/Covertness/coap-rs/pull/88