Skip to main content

parse_command

Function parse_command 

Source
pub fn parse_command<V: Version>(
    reader: &mut impl Read,
    ctx: &ParserOptions<V>,
    buf: &mut Vec<u8>,
) -> ReplayResult<Option<V::Command>>
Expand description

Parses one command

Packet structure in bytestream

    4   7      7      7
    TLLDTLLDDDDTLLDDDDTLLDDDD
    =========================

Where:

    T - byte - defines command type
    L - short - defines command length of T + L + D
    D - variable length - binary data of size `command length`, may be empty