Table of Contents

Class Packet

A lightweight data transfer container used to send structured messages between systems (e.g. over WebSocket, local IPC, or within the same process).

public class Packet
Inheritance
Packet
Inherited Members

Remarks

The Header acts as a content-type descriptor (e.g. "gzip") and the Payload carries the actual data, which may be plain JSON or a GZip-compressed Base64 string after calling CompressPayload(Packet).

Properties

Header

An optional identifier or content-type hint for the payload (e.g. "gzip" when the payload is compressed, or an event name).

public string Header { get; set; }

Property Value

string

Payload

The main data content of the packet, either raw JSON or a Base64-encoded GZip-compressed string.

public string Payload { get; set; }

Property Value

string