1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Describe recommended-methods.

Addrinfo.getaddrinfo is recommended instead of
Socket.gethostbyname.

Addrinfo#getnameinfo is recommended instead of
Socket.gethostbyaddr.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2017-10-21 14:21:52 +00:00
parent e4ff51b05a
commit d88a0f13c2

View file

@ -983,6 +983,7 @@ sock_sockaddr(struct sockaddr *addr, socklen_t len)
* call-seq:
* Socket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list]
*
* Use Addrinfo.getaddrinfo instead.
* This method is deprecated since following reasons:
*
* - The 3rd element of result is the address family of the first address.
@ -1010,6 +1011,7 @@ sock_s_gethostbyname(VALUE obj, VALUE host)
* call-seq:
* Socket.gethostbyaddr(address_string [, address_family]) => hostent
*
* Use Addrinfo#getnameinfo instead.
* This method is deprecated since following reasons:
*
* - Uncommon address representation: