peeraddr

unixsocket.peeraddr => [address_family, unix_path]
Instance Public methods

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

Example

serv = UNIXServer.new("/tmp/sock")
c = UNIXSocket.new("/tmp/sock")
p c.peeraddr #=> ["AF_UNIX", "/tmp/sock"]
doc_ruby_on_rails
2015-06-10 01:33:00
Comments
Leave a Comment

Please login to continue.