Class: PacketGen::Header::TCP::WS
- Defined in:
- lib/packetgen/header/tcp/option.rb
Overview
Window Size TCP option
Constant Summary
Constants inherited from Option
Option::ECHOREPLY_KIND, Option::ECHO_KIND, Option::EOL_KIND, Option::MSS_KIND, Option::NOP_KIND, Option::SACKOK_KIND, Option::SACK_KIND, Option::TS_KIND, Option::WS_KIND
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ WS
constructor
A new instance of WS.
-
#to_human ⇒ String
Get human-readable description.
Methods inherited from Option
#inspect, #length?, #old_set_value, #to_s
Constructor Details
#initialize(options = {}) ⇒ WS
Returns a new instance of WS.
178 179 180 181 |
# File 'lib/packetgen/header/tcp/option.rb', line 178 def initialize(={}) super self[:value] = BinStruct::Int8.new(value: [:value]) end |
Instance Method Details
#to_human ⇒ String
Get human-readable description
185 186 187 |
# File 'lib/packetgen/header/tcp/option.rb', line 185 def to_human "WS:#{value}" end |