Class: Gem::Resolv::DNS::SvcParam::ALPN

Inherits:
Gem::Resolv::DNS::SvcParam show all
Defined in:
lib/rubygems/vendor/resolv/lib/resolv.rb

Overview

“alpn” SvcParam – Additional supported protocols

Constant Summary collapse

KeyName =
:alpn
KeyNumber =
1

Constants inherited from Gem::Resolv::DNS::SvcParam

ClassHash

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gem::Resolv::DNS::SvcParam

key_name, key_number

Constructor Details

#initialize(protocol_ids) ⇒ ALPN

Initialize “alpn” ScvParam.



1927
1928
1929
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1927

def initialize(protocol_ids)
  @protocol_ids = protocol_ids.map(&:to_str)
end

Instance Attribute Details

#protocol_idsObject (readonly)

Supported protocol IDs.



1922
1923
1924
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1922

def protocol_ids
  @protocol_ids
end

Class Method Details

.decode(msg) ⇒ Object

:nodoc:



1935
1936
1937
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1935

def self.decode(msg) # :nodoc:
  return self.new(msg.get_string_list)
end

Instance Method Details

#encode(msg) ⇒ Object

:nodoc:



1931
1932
1933
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1931

def encode(msg) # :nodoc:
  msg.put_string_list(@protocol_ids)
end