Project

General

Profile

Feature #11700

positive flags for reverse lookup to socket

Added by nobu (Nobuyoshi Nakada) almost 4 years ago. Updated almost 4 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:71511]

Description

Now BasicSocket has do_not_reverse_lookup global and per-socket attributes.
Negative flag makes less readability.
So I propose the inverse and positive attributes,

  • BasicSocket.reverse_lookup
  • BasicSocket.reverse_lookup=
  • BasicSocket#reverse_lookup
  • BasicSocket#reverse_lookup=

These methods share the same flags with do_not_reverse_lookup, just invert input/output values.

patch

History

Updated by normalperson (Eric Wong) almost 4 years ago

nobu@ruby-lang.org wrote:

Now BasicSocket has do_not_reverse_lookup global and per-socket attributes.
Negative flag makes less readability.
So I propose the inverse and positive attributes,

  • BasicSocket.reverse_lookup
  • BasicSocket.reverse_lookup=

I prefer we skip these globals and deprecate the existing global ones.
(and maybe even deprecating per-socket).

It's a complete performance killer to enable reverse lookup and nobody
should be doing it for every socket.

Also available in: Atom PDF