package
0.0.0-20220420091620-9a109683b971
Repository: https://github.com/dan-drl/framework.git
Documentation: pkg.go.dev

# Functions

BroadcastMessage send broadcast message to channel and record stats.
HandleWebSocketCommand used to register command and handler.
InitWebSocket start websocket.
ServeWs handles websocket requests from the peer.

# Constants

ConfigMessage used to send configuration.
PrivateMessage means message is 1 to 1.
PublicMessage means broadcast message.

# Structs

Hub maintains the set of active connections and broadcasts messages to the connections.
WebsocketConnection is an middleman between the websocket connection and the hub.

# Type aliases

MsgType is the type of different message.
WebsocketHandlerFunc define the func to handle websocket.