Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebSocketConnection ¶
------------------------------------------------------
------------------------------------------------------ WebSocketConnection is a wrapper for our websocket connection, in case we ever need to put more data into the struct
type WsClientPayload ¶
type WsClientPayload struct { Action string `json:"action"` Username string `json:"username"` Message string `json:"message"` Conn WebSocketConnection `json:"-"` }
WsPayload defines the websocket request from the client ------------------------------------------------------
payload from client to server
------------------------------------------------------
type WsServerPayload ¶
type WsServerPayload struct { Action string `json:"action"` Message string `json:"message"` MessageType string `json:"messagetype"` Data any `json:"data"` Conn *WebSocketConnection `json:"-"` }
------------------------------------------------------
payload from server to client
------------------------------------------------------
Click to show internal directories.
Click to hide internal directories.