From 0caa6d9b5b7df52ba056582437f52849b55ab34a Mon Sep 17 00:00:00 2001 From: Dave Bakker Date: Fri, 18 Aug 2023 11:02:16 +0200 Subject: [PATCH] Enable `send`-like behaviour by making datagram::remote-address optional. --- example-world.md | 20 +++++++++++++++----- wit/udp.wit | 19 ++++++++++++++----- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/example-world.md b/example-world.md index 8c74520..24014ff 100644 --- a/example-world.md +++ b/example-world.md @@ -325,8 +325,17 @@ mean "ready".

record datagram

Record Fields

Functions

@@ -466,14 +475,15 @@ returns how many messages were actually sent (or queued for sending).

sending each individual datagram until either the end of the list has been reached or the first error occurred. If at least one datagram has been sent successfully, this function never returns an error.

If the input list is empty, the function returns ok(0).

-

The remote address option is required. To send a message to the "connected" peer, -call remote-address to get their address.

+

On "connected" sockets, the remote-address is optional. +This is equivalent to send in POSIX or sendmsg without a remote address.

Typical errors