class TFTP::Packet::Base

Base is a thin layer over a Struct.

Public Instance Methods

encode() click to toggle source

Encode the packet back to binary string. It uses the to_str method to properly format each packet, and then forces 8bit encoding.

# File lib/tftp/tftp.rb, line 19
def encode; to_str.force_encoding('ascii-8bit'); end