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

Does not work with non_blocking communication. #19

Open
Superhepper opened this issue Jun 25, 2020 · 1 comment
Open

Does not work with non_blocking communication. #19

Superhepper opened this issue Jun 25, 2020 · 1 comment

Comments

@Superhepper
Copy link

Superhepper commented Jun 25, 2020

I have tried to use this with a non_blocking socket and I get some weird error:

panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }'
protocol-3.1.3/src/wire/stream/transport/simple.rs:116:30

Is non blocking sockets supported?

@dylanmckay
Copy link
Owner

Non blocking sockets are not directly supported, although a patch to fix that would be welcomed.

If memory serves me right, when I needed to use this with nonblocking sockets a while back, I worked around it by loading the data into a buffer then attempting decoding on the buffer rather than the socket. EOF encounters are ignored under the presumption that there is more data available when data is next ready.

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