ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
network/packet/decoder.h
Go to the documentation of this file.
1#pragma once
3
9typedef struct {
13 size_t used, size;
14 size_t max_payload;
15 bool failed;
17typedef asciichat_error_t (*packet_decoder_fn)(const void *, size_t, void *);
unsigned char uint8_t
Definition common.h:60
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
bool packet_decoder_pending(const packet_decoder_t *)
asciichat_error_t(* packet_decoder_fn)(const void *, size_t, void *)
asciichat_error_t packet_decoder_feed(packet_decoder_t *, const void *, size_t, packet_decoder_fn, void *)
void packet_decoder_reset(packet_decoder_t *)
When code needs to work with packet decoder, it keeps header_used, packet, used, size here instead of...
size_t max_payload
Zero uses MAX_PACKET_SIZE; set before the first feed.
uint8_t header[sizeof(packet_header_t)]
Fixed prefix shared by every ACIP packet on the wire.
Definition packet.h:628