Class: TFTP::Packet::DATA

Inherits:
Object
  • Object
show all
Defined in:
lib/tftp/tftp.rb

Instance Method Summary collapse

Instance Method Details

#last?Boolean

Check if this is the last data packet for this session.

Returns:

  • (Boolean)


40
# File 'lib/tftp/tftp.rb', line 40

def last?; self.data.length < 512; end

#to_strObject



38
# File 'lib/tftp/tftp.rb', line 38

def to_str; "\x00\x03" + [self.seq].pack('n') + self.data; end