package
Version:
v0.0.0-...-ff2426d
Opens a new window with list of versions in this module.
Published: May 29, 2019
License: MIT
Opens a new window with license information.
Imports: 8
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.
type ChatRequest struct {
RoomID string `json:"room_id" form:"room_id"`
UserID int `json:"user_id" form:"user_id"`
UserName string `json:"user_name" form:"user_name"`
}
ChatRequest 聊天室请求
Client is a middleman between the websocket connection and the hub.
Hub maintains the set of active clients and broadcasts messages to the
clients.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.