Class: Resolv::DNS::Resource::IN::ServiceBinding
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/resolv.rb |
Overview
Common implementation for SVCB-compatible resource records.
Class Method Summary
-
.new(priority, target, params = []) ⇒ ServiceBinding
constructor
Create a service binding resource record.
- .decode_rdata(msg) Internal use only
Instance Attribute Summary
-
#alias_mode? ⇒ Boolean
readonly
Whether this RR is in AliasMode.
-
#params
readonly
The service paramters for the target host.
-
#priority
readonly
The priority of this target host.
-
#service_mode? ⇒ Boolean
readonly
Whether this RR is in ServiceMode.
-
#target
readonly
The domain name of the target host.
Instance Method Summary
- #encode_rdata(msg) Internal use only
Constructor Details
.new(priority, target, params = []) ⇒ ServiceBinding
Create a service binding resource record.
Class Method Details
.decode_rdata(msg)
This method is for internal use only.
[ GitHub ]
Instance Attribute Details
#alias_mode? ⇒ Boolean
(readonly)
Whether this RR is in AliasMode.
# File 'lib/resolv.rb', line 2781
def alias_mode? self.priority == 0 end
#params (readonly)
The service paramters for the target host.
# File 'lib/resolv.rb', line 2776
attr_reader :params
#priority (readonly)
The priority of this target host.
The range is 0-65535. If set to 0, this RR is in AliasMode. Otherwise, it is in ServiceMode.
# File 'lib/resolv.rb', line 2766
attr_reader :priority
#service_mode? ⇒ Boolean
(readonly)
Whether this RR is in ServiceMode.
# File 'lib/resolv.rb', line 2788
def service_mode? !alias_mode? end
#target (readonly)
The domain name of the target host.
# File 'lib/resolv.rb', line 2771
attr_reader :target
Instance Method Details
#encode_rdata(msg)
This method is for internal use only.
[ GitHub ]
# File 'lib/resolv.rb', line 2792
def encode_rdata(msg) # :nodoc: msg.put_pack("n", @priority) msg.put_name(@target, compress: false) @params.encode(msg) end