Module record

Module record 

Source
Expand description

XDR record marking

This module implements wrappers for Write and BufRead which implement “Record Marking” from RFC1831, used for encoding XDR structures onto a bytestream such as TCP.

The format is simple - each record is broken up into one or more record fragments. Each record fragment is prefixed with a 32-bit big-endian value. The low 31 bits is the fragment size, and the top bit is the “end of record” marker, indicating the last fragment of the record.

There’s no magic number or other way to determine whether a stream is using record marking; both ends must agree.

Structs§

XdrRecordReader
Read records from a bytestream.
XdrRecordReaderIter
Iterator over records in the stream.
XdrRecordWriter
Write records into a bytestream.