to_range

to_range() Instance Public methods Creates a Range object for the network address.

to_s

to_s() Instance Public methods Returns a string containing the IP address representation.

to_string

to_string() Instance Public methods Returns a string containing the IP address representation in canonical form.

|

|(other) Instance Public methods Returns a new ipaddr built by bitwise OR.

~

~() Instance Public methods Returns a new ipaddr built by bitwise negation.

mask!

mask!(mask) Instance Protected methods Set current netmask to given mask.

set

set(addr, *family) Instance Protected methods Set +@addr+, the internal stored ip address, to given addr. The parameter addr is validated using the first family member, which is Socket::AF_INET or Socket::AF_INET6.

getaddress

IPSocket.getaddress(host) => ipaddress Class Public methods Lookups the IP address of host. IPSocket.getaddress("localhost") #=> "127.0.0.1" IPSocket.getaddress("ip6-localhost") #=> "::1" getaddress_orig

addr

ipsocket.addr([reverse_lookup]) => [address_family, port, hostname, numeric_address] Instance Public methods Returns the local address as an array which contains address_family, port, hostname and numeric_address. If reverse_lookup is true or :hostname, hostname is obtained from numeric_address using reverse lookup. Or if it is false, or :numeric, hostname is same as numeric_address. Or if it is nil or ommitted, obeys to ipsocket.do_not_reverse_lookup. See Socket.getaddrinfo al

peeraddr

ipsocket.peeraddr([reverse_lookup]) => [address_family, port, hostname, numeric_address] Instance Public methods Returns the remote address as an array which contains address_family, port, hostname and numeric_address. It is defined for connection oriented socket such as TCPSocket. If reverse_lookup is true or :hostname, hostname is obtained from numeric_address using reverse lookup. Or if it is false, or :numeric, hostname is same as numeric_address. Or if it is nil or ommitte