Class: Whois::Server::Adapters::Afilias

Inherits:
Base
  • Object
show all
Defined in:
lib/whois/server/adapters/afilias.rb

Overview

Afilias Adapter

Provides ability to query Afilias WHOIS interfaces.

Constant Summary

Constants inherited from Base

Base::DEFAULT_BIND_HOST, Base::DEFAULT_WHOIS_PORT

Instance Attribute Summary

Attributes inherited from Base

#allocation, #buffer, #host, #options, #type

Instance Method Summary collapse

Methods inherited from Base

#==, #configure, #initialize, #lookup, #query_handler

Constructor Details

This class inherits a constructor from Whois::Server::Adapters::Base

Instance Method Details

#request(string) ⇒ void

This method returns an undefined value.

Executes a WHOIS query to the Afilias WHOIS interface, resolving any intermediate referral, and appends the response to the client buffer.

Parameters:

  • string (String)


30
31
32
33
34
35
36
37
38
# File 'lib/whois/server/adapters/afilias.rb', line 30

def request(string)
  response = query_the_socket(string, host)
  buffer_append response, host

  if options[:referral] != false && (referral = extract_referral(response))
    response = query_the_socket(string, referral)
    buffer_append(response, referral)
  end
end