When the socket not bound, all sync and async variants of ReceiveFrom and ReceiveMessageFrom seem to throw InvalidOperationException.
SocketAsyncEventArg overloads fail with SocketError.InvalidArgument instead. Furthermore: ReceiveMessageFrom hits an assertion failure, and on Unix ReceiveFrom does not fail at all.
I'm not sure if it's by design, or is it a something we want to change this for consistency.
When the socket not bound, all sync and async variants of
ReceiveFromandReceiveMessageFromseem to throwInvalidOperationException.SocketAsyncEventArgoverloads fail withSocketError.InvalidArgumentinstead. Furthermore:ReceiveMessageFromhits an assertion failure, and on UnixReceiveFromdoes not fail at all.I'm not sure if it's by design, or is it a something we want to change this for consistency.