Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleWebSocket ¶
func HandleWebSocket(hub *Hub) gin.HandlerFunc
HandleWebSocket 处理WebSocket连接请求
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 表示一个WebSocket连接客户端
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub 管理所有活跃的WebSocket连接
func (*Hub) BroadcastToUser ¶
BroadcastToUser 向特定用户广播消息
Click to show internal directories.
Click to hide internal directories.