new(host, port=Port) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/resolv.rb, line 675
        def initialize(host, port=Port)
          super()
          @host = host
          @port = port
          @sock = UDPSocket.new(host.index(':') ? Socket::AF_INET6 : Socket::AF_INET)
          DNS.bind_random_port(@sock)
          @sock.connect(host, port)
          @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
        end
Register or log in to add new notes.