Partial fix #2623: posixlib sys/socket sendto() & recvfrom() now succeed on Linux & Windows using IPv6 #2705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a binary change and is intended for the next Scala Native version which changes the major version number.
As per the title, the the two posixlib sys/socket sendto() & recvfrom() methods now succeed when using IPv6.
The new test suite
Udp6SocketTest.scala
exercises those methods using IPv6. Lessons learned fromUdp6SocketTest.scala
were applied to the existing IPv4UdpSocketTest.scala
.Issue #2626 remains. I hope to address it a PR after this one has merged.
Proof-of-concept code is working on macOS.
Running the tests on BSD based systems, macOS & FreeBSD, is disabled
until Issue #2226 is fixed.
This PR supersedes WIP PR #2632.
Rationale:
Posix specifies the name and type of elements of a structure. The order is not
specified so Scala Native can use any order it chooses. Common & civilized
practice is to follow the order in the posix spec. Linux, macOs, FreeBSD, and
Windows all follow this practice.
Scala Native now follows suite. This reduces cognitive load and WT? factor on
the severely limited number of developers using Scala Native with IPv6.