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:
parent
e4ff51b05a
commit
d88a0f13c2
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue