Documentation ¶
Overview ¶
Package prot provides protocol structures for communication between chat server and client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct { Message *Message `json:"message,omitempty"` // conversation message Ping *Ping `json:"ping,omitempty"` // ping message Roster *Roster `json:"roster,omitempty"` // roster (list of users) message }
Envelope is a top level communication structure. Includes all another submessages.
type Message ¶
type Message struct { Ts time.Time `json:"ts"` // timestamp Name string `json:"name"` // username Text string `json:"text"` // plain text for console clients HTML string `json:"html"` // html text for browsers Notification string `json:"notification"` // plain notification for browsers Color string `json:"color"` // RGB color ColorXterm256 string `json:"color_xterm256"` // xterm color number suitable for \033[%sm formatting }
Message is a conversation message
Click to show internal directories.
Click to hide internal directories.