diff --git a/example-world.md b/example-world.md index 736792b..a884a99 100644 --- a/example-world.md +++ b/example-world.md @@ -322,11 +322,66 @@ mean "ready".

#### `type udp-socket` `u32`

A UDP socket handle. -

record datagram

+

record outbound-datagram

+

A UDP datagram to be sent.

Record Fields
+

record inbound-datagram

+

A received UDP datagram.

+
Record Fields
+

Functions

@@ -429,11 +484,8 @@ If the TCP/UDP port is zero, the socket will be bound to a random free port.

receive: func

Receive a message.

-

Returns:

- +

See inbound-datagram for more information per field. +When an implementation does not support a particular field, that field must be set to none.

Typical errors

Return values

send: func

-

Send a message to a specific destination address.

-

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

+

Send a message.

+

See outbound-datagram for more information per field. +Unless otherwise specified, every option field in the datagram may be set to none. In which case it is left up to the implementation to pick a suitable value.

Typical errors