ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
ascii_frame_packet_t Struct Reference

The wire metadata for one rendered ASCII frame. width and height describe the terminal grid, original_size and compressed_size bound the encoded text, and checksum detects corruption; flags carry frame-specific options. The variable text follows this fixed prefix and is owned by the packet storage until decoding completes. More...

#include <include/ascii-chat/network/packet/packet.h>

Data Fields

uint32_t width
 Terminal width in characters.
uint32_t height
 Terminal height in characters.
uint32_t original_size
 Size of original uncompressed ASCII data in bytes.
uint32_t compressed_size
 Size of compressed data (0 = not compressed).
uint32_t checksum
 CRC32 checksum of original ASCII data.
uint32_t flags
 Frame flags bitmask (HAS_COLOR, IS_COMPRESSED, etc.).

Detailed Description

The wire metadata for one rendered ASCII frame. width and height describe the terminal grid, original_size and compressed_size bound the encoded text, and checksum detects corruption; flags carry frame-specific options. The variable text follows this fixed prefix and is owned by the packet storage until decoding completes.

ASCII frame packet structure (Packet Type 2)

Contains complete ASCII art frame with metadata for terminal rendering. Used for both client->server (camera input) and server->client (mixed output) transmission.

Note
ASCII frame data follows this header in the packet payload.
If compressed_size > 0, data is zstd compressed.
Format: char data[original_size] or compressed_data[compressed_size]

Definition at line 920 of file packet.h.

Field Documentation

◆ checksum

uint32_t ascii_frame_packet_t::checksum

CRC32 checksum of original ASCII data.

Definition at line 930 of file packet.h.

◆ compressed_size

uint32_t ascii_frame_packet_t::compressed_size

Size of compressed data (0 = not compressed).

Definition at line 928 of file packet.h.

◆ flags

uint32_t ascii_frame_packet_t::flags

Frame flags bitmask (HAS_COLOR, IS_COMPRESSED, etc.).

Definition at line 932 of file packet.h.

◆ height

uint32_t ascii_frame_packet_t::height

Terminal height in characters.

Definition at line 924 of file packet.h.

◆ original_size

uint32_t ascii_frame_packet_t::original_size

Size of original uncompressed ASCII data in bytes.

Definition at line 926 of file packet.h.

◆ width

uint32_t ascii_frame_packet_t::width

Terminal width in characters.

Definition at line 922 of file packet.h.

Referenced by acip_send_ascii_frame_contract().


The documentation for this struct was generated from the following file: