Class: Net::DNS::MDNSSD::ResolveReply

Inherits:
Object
  • Object
show all
Defined in:
lib/net/dns/mdns-sd.rb

Overview

A reply yielded by #resolve, see MDNSSD for a description of the attributes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ansrv, antxt) ⇒ ResolveReply

:nodoc:



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/net/dns/mdns-sd.rb', line 90

def initialize(ansrv, antxt) # :nodoc:
  @interface = nil
  @fullname = ansrv.name.to_s
  @domain, @type, @name = MDNSSD::Util.parse_name(ansrv.name)
  @target = ansrv.data.target.to_s
  @port = ansrv.data.port
  @priority = ansrv.data.priority
  @weight = ansrv.data.weight
  @text_record = MDNSSD::Util.parse_strings(antxt.data.strings)
  @flags = ansrv.ttl
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def domain
  @domain
end

#flagsObject (readonly)

Returns the value of attribute flags.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def flags
  @flags
end

#fullnameObject (readonly)

Returns the value of attribute fullname.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def fullname
  @fullname
end

#interfaceObject (readonly)

Returns the value of attribute interface.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def interface
  @interface
end

#nameObject (readonly)

Returns the value of attribute name.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def name
  @name
end

#portObject (readonly)

Returns the value of attribute port.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def port
  @port
end

#priorityObject (readonly)

Returns the value of attribute priority.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def priority
  @priority
end

#targetObject (readonly)

Returns the value of attribute target.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def target
  @target
end

#text_recordObject (readonly)

Returns the value of attribute text_record.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def text_record
  @text_record
end

#typeObject (readonly)

Returns the value of attribute type.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def type
  @type
end

#weightObject (readonly)

Returns the value of attribute weight.



89
90
91
# File 'lib/net/dns/mdns-sd.rb', line 89

def weight
  @weight
end