Skip to content

Commit

Permalink
Merge pull request #104 from hubertmis/pr/send-multicast-with-arbitra…
Browse files Browse the repository at this point in the history
…ry-address

Add function to send multicast messages to an arbitrary multicast address
  • Loading branch information
Covertness authored Sep 4, 2024
2 parents eef2f06 + 6d86baf commit cffad3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,15 @@ impl UdpCoAPClient {
),
};

self.send_multicast(request, &addr).await
}

/// Send a multicast request to multiple devices.
pub async fn send_multicast(
&self,
request: &CoapRequest<SocketAddr>,
addr: &SocketAddr,
) -> IoResult<()> {
match request.message.to_bytes() {
Ok(bytes) => {
let size = self
Expand Down

0 comments on commit cffad3c

Please sign in to comment.