Open
Description
If you put a socket into nonblocking mode (i.e. set Socket.Blocking=false) and then call synchronous SendFile, you get unexpected behavior.
On Windows, the call will block but will ultimately succeed.
(EDIT: See my comment below for clarification.) On Linux, you will likely end up with an EWOULDBLOCK result, but this isn't not reliable; sometimes the call will succeed, sometimes it will send partial data, etc.
SendFile is not intended to be used in nonblocking mode. If a user attempts this we should throw InvalidOperationException.
More details here: #47230 (review)