This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

getsockname

        # BasicSocket.getsockname

(from ruby core)
---
    basicsocket.getsockname => sockaddr

---

Returns the local address of the socket as a sockaddr string.

    TCPServer.open("127.0.0.1", 15120) {|serv|
      p serv.getsockname #=> "\x02\x00;\x10\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
    }

If Addrinfo object is preferred over the binary string, use
BasicSocket#local_address.



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.