x/net: Implement PacketConn.JoinSourceSpecificGroup() and PacketConn.LeaveSourceSpecificGroup for Windows #40317
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Following this documentation https://godoc.org/golang.org/x/net/ipv4 we wanted to join a multicast group and receive packets from a specified source on Windows :
What did you expect to see?
We expected to join a multicast group with a specified source.
What did you see instead?
An error message explaining that PacketConn.JoinSourceSpecificGroup() from
/net/ipv4
is not implemented on Windows.What's next?
A pull request will quickly follow this issue. This PR aims to add the support of JoinSourceSpecificGroup() and LeaveSourceSpecificGroup() to Windows OSes.
We plan on doing so by adding the IP_ADD_SOURCE_MEMBERSHIP and the IP_DROP_SOURCE_MEMBERSHIP options to the list of sockopts supported on Windows.
https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options
We do know that there's a more recent API (https://docs.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-group_source_req) that we could use to implement these two methods on Windows but we chose to use the IPProto socket options for the following reasons:
The text was updated successfully, but these errors were encountered: