ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
queued_packet_t Struct Reference

Single packet ready to send (header already in network byte order) More...

#include <lib/network/packet_queue.h>

Data Fields

packet_header_t header
 Complete packet header (already in network byte order)
 
void * data
 Packet payload data (can be NULL for header-only packets)
 
size_t data_len
 Length of payload data in bytes.
 
bool owns_data
 If true, free data when packet is freed.
 
buffer_pool_tbuffer_pool
 Pool that allocated the data (NULL if malloc'd)
 

Detailed Description

Single packet ready to send (header already in network byte order)

Represents a complete packet with header and optional payload data. The packet header should already be in network byte order before enqueueing.

Note
If owns_data is true, the packet queue will free the data when the packet is freed (either via packet_queue_free_packet() or queue destruction).
buffer_pool tracks which pool allocated the data (if any) for proper return to the pool. NULL means data was allocated with malloc().

Definition at line 120 of file packet_queue.h.


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