package
Version:
v0.0.0-...-beb3175
Opens a new window with list of versions in this module.
Published: Jan 19, 2024
License: Unlicense
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
ServeWs handles websocket requests from the peer.
Client is a middleman between the websocket connection and the hub.
Hub maintains the set of active clients and broadcasts messages to the
clients.
type Packet struct {
PacketType string `json:"type"`
Data interface{} `json:"data"`
}
type Player struct {
Name string `json:"name"`
Color string `json:"color"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.