Sha256: 6e60bbc7dd79c3cce03f2170b6861d12b5299aeaa2a8834d78791276ad7ec07d
Contents?: true
Size: 420 Bytes
Versions: 11
Compression:
Stored size: 420 Bytes
Contents
class XDR::RPC::RecordReader include XDR::Concerns::ReadsBytes LAST_MASK = 0x80000000 LENGTH_MASK = 0x7FFFFFFF def read(io) header = read_bytes(io, 4).unpack("L>").first length = header & LENGTH_MASK last = (header & LAST_MASK) > 0 raw_content = read_bytes(io, length) content = StringIO.new(raw_content) XDR::RPC::Record.new(last, length, content) end end
Version data entries
11 entries across 11 versions & 2 rubygems