method

ipv6?

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: Addrinfo
ipv6?() public

returns true if addrinfo is IPv6 address. returns false otherwise.

Addrinfo.tcp("127.0.0.1", 80).ipv6? #=> false
Addrinfo.tcp("::1", 80).ipv6?       #=> true
Addrinfo.unix("/tmp/sock").ipv6?    #=> false
Show source
Register or log in to add new notes.