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

Read(timeout) stuck when no data from device #117

Open
tht213itspoiler opened this issue Aug 23, 2020 · 1 comment
Open

Read(timeout) stuck when no data from device #117

tht213itspoiler opened this issue Aug 23, 2020 · 1 comment

Comments

@tht213itspoiler
Copy link

Hi Contributors,

Before I get into my issue, thank you very much for the library.

I am writing a simple winform app to write and read data from my custom HID device (keyboard). It work fine when connect, write and read data in order. But when I does not write data to the device and call Read(timeouts) function, the app will stuck because the read func is waiting for new data form IO.
I have tried to edit read function by add a Task and cancel when timeout occurs but I just created new issue that write feature is not work anymore. I think because the read method is still holding the IO.
I googled about my problem and figure out that the read method can set the timeout but it set for C++ platform, so I dont know how to deal with it and still stuck in C#.

So I raise a issue and hope that anyone has faced this issue and knew how to deal with it in C# library (nativemethod wrapping).
Thank you,
Trong Truong

@MarcoCLA
Copy link

MarcoCLA commented Apr 8, 2022

I'm facing the same issue currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants