protocol
protocol copied to clipboard
Does not work with non_blocking communication.
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?
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.