Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeRegister = "register" TypeConnectRequest = "connect_request" TypeConnectAccept = "connect_accept" TypeConnectReject = "connect_reject" TypePublicKey = "public_key" TypeAESKey = "aes_key" TypeMessage = "message" TypeACK = "ack" TypeHeartbeat = "heartbeat" TypeDisconnect = "disconnect" )
Packet Types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Packet ¶
type Packet struct {
Type string `json:"type"`
From string `json:"from"`
To string `json:"to"`
Payload string `json:"payload,omitempty"` // Base64 encoded data
Timestamp int64 `json:"timestamp,omitempty"`
MessageID string `json:"message_id,omitempty"`
}
Packet represents the standard message structure.
Click to show internal directories.
Click to hide internal directories.