6.88. kink/socket/DATAGRAM

6.88.1. type datagram

`datagram` is a unit of message transfer of datagram oriented protocols like UDP.

A `datagram` value consists of two attributes:

• remote: The remote socket address as a `socket_address` value.

• bin: The content of the message as a `bin` value.

6.88.1.1. D.remote

`remote` returns the `socket_address` value of the remote socket address.

6.88.1.2. D.bin

`bin` returns the `bin` value of the content of the message.

6.88.1.3. X == Y

`==` operator, or `op_eq` method, returns whether the remote socket addresses of `X` and `Y` are equal, and the `bin` values of `X` and `Y` are equal.

Precondition

`Y` must be a `datagram`.

6.88.2. DATAGRAM.new(Remote Bin)

`new` returns a `datagram` value.

Preconditions

`Remote` must be a `socket_address`.

`Bin` must be a `bin`.

6.88.3. DATAGRAM.is?(Val)

`is?` returns whether `Val` is a `datagram` value.