4.84. kink/socket/IP_ADDRESS_PORT

Provides ip_address_port type.

4.84.1. type ip_address_port

A tuple of an IP address and a port number, which can be a socket address.

`ip_address_port` is a subtype of `socket_address`.

4.84.1.1. Iap.ip_address

`ip_address` returns the IP address, in ip_address type.

4.84.1.2. Iap.port

`port` returns the port number as an int num.

4.84.1.3. Iap.branch_socket_address($iap_cont $uds_path_cont)

`branch_socket_address` tail-calls $iap_cont with no arg.

4.84.1.4. Iap.op_eq(Arg)

`op_eq` returns whether `Arg` is ip_address_port, and `Iap` and `Arg` have the same IP address and the same port number.

Precondition

• `Arg` must be a socket_address

4.84.2. IP_ADDRESS_PORT.new(Ip_address Port)

`new` makes a new ip_address_port value.

Preconditions

• `Ip_address` must be ip_address

• `Port` must be an int num in the range [0, 65535]

4.84.3. IP_ADDRESS_PORT.is?(Val)

`is?` returns whether `Val` is ip_address_port.