4.88. kink/socket/IP_ADDRESS_PORT¶
Provides ip_address_port type.
4.88.1. type ip_address_port¶
ip_address_port is a pair of an IP address and a port number. ip_address_port is a subtype of socket_address type.
The port number of 0 indicates that an ephemeral port is assigned in `bind` operation, like Udp_socket.bind, Tcp_connection.bind, and Tcp_server.bind_listen.
4.88.1.1. Iap.ip_address¶
`ip_address` returns the IP address, in ip_address type.
4.88.1.2. Iap.port¶
`port` returns the port number as an int num.
4.88.1.3. Iap.protocol_family¶
`protocol_family` returns either PROTOCOL_FAMILY.ipv4 or PROTOCOL_FAMILY.ipv6.
4.88.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.88.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.88.3. IP_ADDRESS_PORT.is?(Val)¶
`is?` returns whether `Val` is ip_address_port.