Skip to content

DatagramSocket is ipv4 by default #892

@omry

Description

@omry

DatagramSocket constructed with the default constructor is IPV4 by default.
when bind(sa) is called on such a socket, even if the socket address is IPV6, the socket fails to bind.

a stupid workaround is to close() the socket before binding, but a better solution is to properly handle this by switching the underlying socket type to ipv6.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions