Skip to content

Unlike other variants, ReceiveFromAsync(saea) and ReceiveMessageFrom(saea) does not throw when socket is not bound #47714

Description

@antonfirsov

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions