protocol icon indicating copy to clipboard operation
protocol copied to clipboard

Does not work with non_blocking communication.

Open Superhepper opened this issue 5 years ago • 1 comments

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?

Superhepper avatar Jun 25 '20 13:06 Superhepper

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.

dylanmckay avatar Jul 01 '20 05:07 dylanmckay