4.84. kink/socket/DATAGRAM

4.84.1. type datagram

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

A `datagram` val consists of two vals:

• The remote socket address.

• The bin, which is the content of the message.

4.84.1.1. D.remote

`remote` method returns the socket_address val of the remote socket address.

4.84.1.2. D.bin

`bin` method returns the `bin` val of the content of the message.

4.84.1.3. X == Y

Two `datagram` vals are equal iff they have the equal remote socket address and the equal bin.

Precondition

• `Y` must be a `datagram` val.

4.84.2. DATAGRAM.new(Remote Bin)

`new` fun makes a `datagram` val.

Preconditions

• `Remote` must be a socket_address val.

• `Bin` must be a `bin` val.

4.84.3. DATAGRAM.is?(Val)

`is?` fun returns whether `Val` is a `datagram` val.