Class: Gem::Resolv::DNS::Resource::IN::SRV
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Gem::Resolv::DNS::Resource
|
Defined in: | lib/rubygems/vendor/resolv/lib/resolv.rb |
Overview
SRV
resource record defined in RFC 2782
These records identify the hostname and port that a service is available at.
Constant Summary
-
ClassValue =
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2735IN::ClassValue
-
TypeValue =
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 273433
::Gem::Resolv::DNS::Resource
- Inherited
Class Method Summary
-
.new(priority, weight, port, target) ⇒ SRV
constructor
Create a
SRV
resource record. - .decode_rdata(msg) Internal use only
::Gem::Resolv::DNS::Resource
- Inherited
::Gem::Resolv::DNS::Query
- Inherited
Instance Attribute Summary
-
#port
readonly
The port on this target host of this service.
-
#priority
readonly
The priority of this target host.
-
#target
readonly
The domain name of the target host.
-
#weight
readonly
A
server selection mechanism.
::Gem::Resolv::DNS::Resource
- Inherited
#ttl | Remaining Time To Live for this |
Instance Method Summary
- #encode_rdata(msg) Internal use only
::Gem::Resolv::DNS::Resource
- Inherited
::Gem::Resolv::DNS::Query
- Inherited
Constructor Details
.new(priority, weight, port, target) ⇒ SRV
Class Method Details
.decode_rdata(msg)
Instance Attribute Details
#port (readonly)
The port on this target host of this service.
The range is 0-65535.
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2776
attr_reader :port
#priority (readonly)
The priority of this target host.
A
client MUST attempt to contact the target host with the lowest-numbered priority it can reach; target hosts with the same priority SHOULD be tried in an order defined by the weight field. The range is 0-65535. Note that it is not widely implemented and should be set to zero.
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2758
attr_reader :priority
#target (readonly)
The domain name of the target host.
A
target of “.” means that the service is decidedly not available at this domain.
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2783
attr_reader :target
#weight (readonly)
A
server selection mechanism.
The weight field specifies a relative weight for entries with the same priority. Larger weights SHOULD be given a proportionately higher probability of being selected. The range of this number is 0-65535. Domain administrators SHOULD use Weight 0 when there isn’t any server selection to do, to make the RR easier to read for humans (less noisy). Note that it is not widely implemented and should be set to zero.
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2770
attr_reader :weight
Instance Method Details
#encode_rdata(msg)
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2785
def encode_rdata(msg) # :nodoc: msg.put_pack("n", @priority) msg.put_pack("n", @weight) msg.put_pack("n", @port) msg.put_name(@target, compress: false) end