method

inspect_sockaddr

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

returns a string which shows the sockaddr in addrinfo with human-readable form.

Addrinfo.tcp("localhost", 80).inspect_sockaddr     #=> "127.0.0.1:80"
Addrinfo.tcp("ip6-localhost", 80).inspect_sockaddr #=> "[::1]:80"
Addrinfo.unix("/tmp/sock").inspect_sockaddr        #=> "/tmp/sock"
Show source
Register or log in to add new notes.