Class: Resolv::DNS::SvcParam::Port
- Inherits:
-
SvcParam
- Object
- SvcParam
- Resolv::DNS::SvcParam::Port
- Defined in:
- lib/resolv.rb
Overview
"port" SvcParam -- Port for alternative endpoint
Constant Summary collapse
- KeyName =
:port- KeyNumber =
3
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.
Constructor Details
#initialize(port) ⇒ Port
Initialize "port" ScvParam.
2170 2171 2172 |
# File 'lib/resolv.rb', line 2170 def initialize(port) @port = port.to_int end |
Instance Attribute Details
#port ⇒ Object (readonly)
Port number.
2165 2166 2167 |
# File 'lib/resolv.rb', line 2165 def port @port end |
Class Method Details
.decode(msg) ⇒ Object
:nodoc:
2178 2179 2180 2181 |
# File 'lib/resolv.rb', line 2178 def self.decode(msg) # :nodoc: port, = msg.get_unpack('n') return self.new(port) end |
Instance Method Details
#encode(msg) ⇒ Object
:nodoc:
2174 2175 2176 |
# File 'lib/resolv.rb', line 2174 def encode(msg) # :nodoc: msg.put_pack('n', @port) end |