to_s

addrinfo.to_sockaddr => string
addrinfo.to_s => string
Instance Public methods

returns the socket address as packed struct sockaddr string.

Addrinfo.tcp("localhost", 80).to_sockaddr
#=> "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
doc_ruby_on_rails
2015-03-30 08:31:42
Comments
Leave a Comment

Please login to continue.