In a program of mine, reading a TCP socket on Windows returns WSA_IO_PENDING
, which is mapped to Uncategorized
by the Windows implementation of Rust (see here). However, ErrorKind::Uncategorized
is hidden in the docs, and it is explicitly stated that It is not recommended to match an error against "Uncategorized"; use a wildcard match ("_") instead
(see here). However, I'm under the impression that WSA_IO_PENDING
is a recoverable error and it should be fine to call read
on the socket again. My question is, how I should handle this case, seeing that it is explicitly discouraged to match this error kind?
Please do note that I'm not an expert on Windows Sockets and my experience is limited. The current behavior of the my program is to drop the socket and create a new one, which I feel is unnecessary in this case.
Thanks a lot in advance.