Skip to content
instance method

UNIXSocket#addr

() -> [ ::String, ::String ]
unixsocket.addr => [address_family, unix_path]

Returns the local address as an array which contains address_family and unix_path.

Example

Example
serv = UNIXServer.new("/tmp/sock")
p serv.addr #=> ["AF_UNIX", "/tmp/sock"]
See also .socketpair #path .pair #peeraddr also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0