ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
error_packet_t Struct Reference

Error packet structure carrying error code and textual description. More...

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

Data Fields

uint32_t error_code
 Error code from asciichat_error_t enumeration.
 
uint32_t message_length
 Length of message payload in bytes (0-512)
 

Detailed Description

Error packet structure carrying error code and textual description.

Error packets allow either side of the connection to report a specific asciichat_error_t along with a human-readable message describing the failure. The message payload follows the structure in the packet and is not guaranteed to be null-terminated on the wire. Consumers should rely on the message_length field when copying. Error packets may be transmitted in plaintext before the crypto handshake completes (and whenever encryption is disabled), but MUST be encrypted once a session key is active.

Definition at line 727 of file packet.h.

Field Documentation

◆ error_code

uint32_t error_packet_t::error_code

Error code from asciichat_error_t enumeration.

Definition at line 729 of file packet.h.

Referenced by acip_send_error(), packet_parse_error_message(), and packet_send_error().

◆ message_length

uint32_t error_packet_t::message_length

Length of message payload in bytes (0-512)

Definition at line 731 of file packet.h.

Referenced by acip_send_error(), packet_parse_error_message(), and packet_send_error().


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