Skip to content

New trait: UdpSplitMulticast#91

Open
ivmarkov wants to merge 2 commits intomasterfrom
split-multicast
Open

New trait: UdpSplitMulticast#91
ivmarkov wants to merge 2 commits intomasterfrom
split-multicast

Conversation

@ivmarkov
Copy link
Copy Markdown
Collaborator

Now that rs-matter had gained Groups support, we do need a way to join/leave Ipv6 multicast groups on a split-socket.

While for mDNS this was not necessary, as the socket can join the mDNS multicast group before it is split, the rs-matter groups' functionality demands dynamic multicast group join/leave while the socket is already split into a read + write halves and operating as such.

So in a way we need a new type of socket split that either:

  • Still splits into a read + write halves, but the write half is not just UdpSend but also MulticastV4 and MulticastV6
  • Or splits into (read, write, multicastv4, multicastv6) tuple

This PR implements the second approach, though for rs-matter specifically the first approach would work too.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new UDP splitting trait to support dynamic IPv4/IPv6 multicast join/leave operations after a socket has been split into independent halves (for group messaging scenarios such as Matter Groups).

Changes:

  • Introduces UdpSplitMulticast and updates UdpConnect::Socket to require it.
  • Implements UdpSplitMulticast for edge-nal-std::UdpSocket and edge-nal-embassy::UdpSocket, including multicast impls for &UdpSocket (embassy).
  • Minor refactors/simplifications in mDNS broadcast iterator construction and HTTP server/task logic.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
edge-nal/src/stack/udp.rs Adds UdpSplitMulticast and tightens UdpConnect::Socket bounds to require it.
edge-nal-std/src/lib.rs Implements UdpSplitMulticast for the std UDP socket wrapper.
edge-nal-embassy/src/udp.rs Implements UdpSplitMulticast for embassy UDP socket and adds multicast traits for &UdpSocket.
edge-mdns/src/io.rs Simplifies IPv6 broadcast iterator chaining.
edge-http/src/lib.rs Refactors chunked/HTTP1.0 validation into a guarded match arm.
edge-http/src/io/server.rs Refactors acceptor loop to iterate signals instead of indexing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants