Indicates some other unhandled resolver error was encountered.
IO
wrapper that allows writing a limited amount of data
Raised when a lockfile cannot be parsed
Raised when the tree is malformed or there is a bug in the compiler.
Returns the hostname.
p Socket.gethostname #=> "hal"
Note that it is not guaranteed to be able to convert to IP address using gethostbyname, getaddrinfo, etc. If you need local IP address, use Socket.ip_address_list
.
Use Addrinfo.getaddrinfo
instead. This method is deprecated for the following reasons:
The 3rd element of the result is the address family of the first address. The address families of the rest of the addresses are not returned.
Uncommon address representation: 4/16-bytes binary string to represent IPv4/IPv6 address.
gethostbyname() may take a long time and it may block other threads. (GVL cannot be released since gethostbyname() is not thread safe.)
This method uses gethostbyname() function already removed from POSIX.
This method obtains the host information for hostname.
p Socket.gethostbyname("hal") #=> ["localhost", ["hal"], 2, "\x7F\x00\x00\x01"]
Use Addrinfo.getaddrinfo
instead. This method is deprecated for the following reasons:
The 3rd element of the result is the address family of the first address. The address families of the rest of the addresses are not returned.
gethostbyname() may take a long time and it may block other threads. (GVL cannot be released since gethostbyname() is not thread safe.)
This method uses gethostbyname() function already removed from POSIX.
This method lookups host information by hostname.
TCPSocket.gethostbyname("localhost") #=> ["localhost", ["hal"], 2, "127.0.0.1"]