Class: Gem::Resolv::DNS::SvcParam::Port
- Inherits:
-
Gem::Resolv::DNS::SvcParam
- Object
- Gem::Resolv::DNS::SvcParam
- Gem::Resolv::DNS::SvcParam::Port
- Defined in:
- lib/rubygems/vendor/resolv/lib/resolv.rb
Overview
“port” SvcParam – Port for alternative endpoint
Constant Summary collapse
- KeyName =
:port
- KeyNumber =
3
Constants inherited from Gem::Resolv::DNS::SvcParam
Instance Attribute Summary collapse
-
#port ⇒ Object
readonly
Port number.
Class Method Summary collapse
-
.decode(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#encode(msg) ⇒ Object
:nodoc:.
-
#initialize(port) ⇒ Port
constructor
Initialize “port” ScvParam.
Methods inherited from Gem::Resolv::DNS::SvcParam
Constructor Details
#initialize(port) ⇒ Port
Initialize “port” ScvParam.
1966 1967 1968 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1966 def initialize(port) @port = port.to_int end |
Instance Attribute Details
#port ⇒ Object (readonly)
Port number.
1961 1962 1963 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1961 def port @port end |
Class Method Details
.decode(msg) ⇒ Object
:nodoc:
1974 1975 1976 1977 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1974 def self.decode(msg) # :nodoc: port, = msg.get_unpack('n') return self.new(port) end |
Instance Method Details
#encode(msg) ⇒ Object
:nodoc:
1970 1971 1972 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1970 def encode(msg) # :nodoc: msg.put_pack('n', @port) end |