Class: TFTP::Packet::Base
- Inherits:
-
Struct
- Object
- Struct
- TFTP::Packet::Base
- Defined in:
- lib/tftp/tftp.rb
Overview
Base is a thin layer over a Struct.
Instance Method Summary collapse
-
#encode ⇒ Object
Encode the packet back to binary string.
Instance Method Details
#encode ⇒ Object
Encode the packet back to binary string. It uses the #to_str method to properly format each packet, and then forces 8bit encoding.
19 |
# File 'lib/tftp/tftp.rb', line 19 def encode; to_str.force_encoding('ascii-8bit'); end |