Documentation
¶
Index ¶
- Variables
- func Contains(s []string, str string) bool
- func CycleClients(p *Pool, m Message)
- func Gamesocket(c echo.Context) error
- func GetClientID() string
- func Registering(c *Client, p *Pool)
- func Remove(s []string, i int) []string
- func Unregistering(c *Client, p *Pool)
- func Upgrade(w http.ResponseWriter, r *http.Request) (*websocket.Conn, error)
- func Writer(conn *websocket.Conn)
- type Client
- type Data
- type Message
- type Pool
Constants ¶
This section is empty.
Variables ¶
View Source
var PoolIDs []string
Functions ¶
func CycleClients ¶
func Gamesocket ¶
func Gamesocket(c echo.Context) error
func GetClientID ¶
func GetClientID() string
func Registering ¶
func Unregistering ¶
Types ¶
type Client ¶
type Client struct { Conn *websocket.Conn Pool *Pool ClientID string `json:"clientid,omitempty"` PoolID string `json:"poolid,omitempty"` Color string `json:"color,omitempty"` Points int `json:"points,omitempty"` Left float32 `json:"left,omitempty"` Top float32 `json:"top,omitempty"` Right float32 `json:"right,omitempty"` Bottom float32 `json:"bottom,omitempty"` ClientIDs []string `json:"clientids,omitempty"` Count int `json:"count,omitempty"` }
type Data ¶
type Data struct { Clientid string `json:"clientid,omitempty"` PoolID string `json:"poolid,omitempty"` Color string `json:"color,omitempty"` Points int `json:"points,omitempty"` Left float32 `json:"left,omitempty"` Top float32 `json:"top,omitempty"` Right float32 `json:"right,omitempty"` Bottom float32 `json:"bottom,omitempty"` ClientIDs []string `json:"clientids,omitempty"` CD []Data `json:"cd,omitempty"` Count int `json:"count,omitempty"` }
Click to show internal directories.
Click to hide internal directories.