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

Watch for signals #44

Open
anton-dutov opened this issue Jul 22, 2021 · 2 comments
Open

Watch for signals #44

anton-dutov opened this issue Jul 22, 2021 · 2 comments

Comments

@anton-dutov
Copy link

Any way to watch input signals (DSR/DCD/CTS) within opened device?

@berkowski
Copy link
Owner

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

@anton-dutov
Copy link
Author

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()?;

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

2 participants