Udp Socket: Update Writes
This is my first iteration at updating how we do writes on UdpSockets
If we want to inherently support retries on an error of type kAgain,
then we will need some large code refactors. Personally, this feels like
overkill to me. UDP is a lossy protocol and inherently supports resends,
so rewriting our code to prevent the occasional Error::Code::kAgain
feels like unecissary work. Though it's possible I am misunderstanding
how the layers using these sockets work.
What does everyone else think?
Also, PTAL take a look at the mdns_sender UTs. We lose a bit of
precision with this way of testing, and I wanted to know everyone's
thoughts
Change-Id: I37485467ab4a82e6d2e18d55878647c5ab771308
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1761628
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Commit-Queue: Ryan Keane <rwkeane@google.com>
diff --git a/platform/api/udp_socket.h b/platform/api/udp_socket.h
index 14f0d65..c294d86 100644
--- a/platform/api/udp_socket.h
+++ b/platform/api/udp_socket.h
@@ -115,9 +115,9 @@
// Sends a message and returns the number of bytes sent, on success.
// Error::Code::kAgain might be returned to indicate the operation would
// block, which can be expected during normal operation.
- virtual Error SendMessage(const void* data,
- size_t length,
- const IPEndpoint& dest) = 0;
+ virtual void SendMessage(const void* data,
+ size_t length,
+ const IPEndpoint& dest) = 0;
// Sets the DSCP value to use for all messages sent from this socket.
virtual Error SetDscp(DscpMode state) = 0;