Struct BinaryReader

Struct Documentation

struct BinaryReader

Deserializes binary data from a stream to a specific type.

Public Static Functions

static BResult ReadRequestHeader(const IStream &stream, RequestHeader &header)

Deserializes binary data from a stream to a RequestHeader.

Parameters
  • stream – The stream to read from.

  • header – The RequestHeader to write to.

Returns

A BResult that indicates if the operation was a success or not.

static BResult ReadMessageFlags(const IStream &stream, uint8_t &messageFlags)

Deserializes binary data from a stream to a unsigned 8 bit integer that represents the message flags.

Parameters
  • stream – The stream to read from.

  • messageFlags – The unsigned 8 bit integer to write to.

Returns

A BResult that indicates if the operation was a success or not.

static BResult ReadInt16(const IStream &stream, int16_t &value)

Deserializes binary data from a stream to an 16 bit sized integer.

Parameters
  • stream – The stream to read from.

  • value – The integer to write to.

Returns

A BResult that indicates if the operation was a success or not.