pseudodns.rb
# Supported DNS record types.  You can specify any record type you wish,
# but these are the ones given explicit support by PseudoConn.
Supported DNS record types.  You can specify any record type you wish,
but these are the ones given explicit support by PseudoConn.
Supported DNS record types . You can specify any record type you wish but these are the ones given explicit support by PseudoConn .
def dns_answer(qname, answers, *conn_opts)
    qtype = PSEUDO_DNS_A
    qtype = conn_opts.shift if conn_opts.first.class <= Integer
    opts = (conn_opts.first || {})
    opts[:transport] = :udp
    opts[:dst_port] ||= 53
    con_opts = {}
    opts.reject! { |k, v| Connection::DEFAULTS.keys.include?(k) ? (con_opts[k] = v; true) : false }
    connection(con_opts) { dns_answer(qname, answers, qtype, opts) }
  end
def dns_answer ( qname , answers , * conn_opts ) qtype = PSEUDO_DNS_A qtype = conn_opts . shift if conn_opts . first . class <= Integer opts = ( conn_opts . first || { } ) opts [ :transport ] = :udp opts [ :dst_port ] ||= 53 con_opts = { } opts . reject! { | k , v | Connection :: DEFAULTS . keys . include? ( k ) ? ( con_opts [ k ] = v ; true ) : false } connection ( con_opts ) { dns_answer ( qname , answers , qtype , opts ) } end
Supported DNS record types.
Supported DNS record types .
qname
<not_specific>
answers
<not_specific>
conn_opts
<not_specific>