tokio-serial
tokio-serial copied to clipboard
Watch for signals
Any way to watch input signals (DSR/DCD/CTS) within opened device?
Thinking on and off about this. I haven't looked too closely to the internals of Tokio/Mio but my first impression is.... maybe.
You could try modeling some new traits after AsyncRead/AsyncWrite that have similar polling functions to check the status of the control lines. It's outside the scope of time I have to work on these crates at the moment though
Just to discuss. If we're find some good concept, so we implement it in the future versions
I've thought about this, it is a bit contrary to the general concept of asynchronous streams. This is very rarely needed, but it may require significantly reworking iternals or may be soolved by some custom method like
let (tx, rx, sig_rx) = builder.open_async_and_signals()?;