End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
BasicSocket#do_not_reverse_lookup
basicsocket.do_not_reverse_lookup => true or false
ext/socket/basicsocket.c
View on GitHub ↗
static VALUE
bsock_do_not_reverse_lookup(VALUE sock)
{
rb_io_t *fptr;
GetOpenFile(sock, fptr);
return (fptr->mode & FMODE_NOREVLOOKUP) ? Qtrue : Qfalse;
}
Gets the do_not_reverse_lookup flag of basicsocket.
Example
require 'socket' BasicSocket.do_not_reverse_lookup = false TCPSocket.open("www.ruby-lang.org", 80) {|sock| p sock.do_not_reverse_lookup #=> false } BasicSocket.do_not_reverse_lookup = true TCPSocket.open("www.ruby-lang.org", 80) {|sock| p sock.do_not_reverse_lookup #=> true }
See also
.do_not_reverse_lookup
.do_not_reverse_lookup=
#do_not_reverse_lookup=
#connect_address
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0