From d88a0f13c2da49b4de8e6f0398f6c1b994c69800 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 21 Oct 2017 14:21:52 +0000 Subject: 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 --- ext/socket/socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext') diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 60dc6f192b..a24eef5a07 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -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: -- cgit v1.2.3