Class: Tcp
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- Tcp
- Defined in:
- lib/tcp.rb
Instance Method Summary collapse
-
#header_length_in_bytes ⇒ Object
virtual assert: :checksum_valid?.
- #length ⇒ Object
- #options_length_in_bytes ⇒ Object
Instance Method Details
#header_length_in_bytes ⇒ Object
virtual assert: :checksum_valid?
29 30 31 |
# File 'lib/tcp.rb', line 29 def header_length_in_bytes data_offset * 4 end |
#length ⇒ Object
37 38 39 |
# File 'lib/tcp.rb', line 37 def length header_length_in_bytes + + payload.length end |
#options_length_in_bytes ⇒ Object
33 34 35 |
# File 'lib/tcp.rb', line 33 def header_length_in_bytes - .rel_offset end |