Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Type string `json:"type"`
Data interface{} `json:"data"`
Timestamp time.Time `json:"timestamp"`
}
Message represents a WebSocket message
type WebSocketHandler ¶
type WebSocketHandler struct {
// contains filtered or unexported fields
}
WebSocketHandler handles WebSocket connections
func NewWebSocketHandler ¶
func NewWebSocketHandler() *WebSocketHandler
NewWebSocketHandler creates a new WebSocket handler
func (*WebSocketHandler) GetClientCount ¶
func (h *WebSocketHandler) GetClientCount() int
GetClientCount returns the number of connected clients
func (*WebSocketHandler) HandleConnection ¶
func (h *WebSocketHandler) HandleConnection(c *gin.Context)
HandleConnection upgrades HTTP connection to WebSocket @Summary Establish WebSocket connection @Description Upgrades HTTP connection to WebSocket for real-time communication @Tags WebSocket @Accept json @Produce json @Success 101 {string} string "WebSocket connection established" @Router /api/ws/connect [get]
Click to show internal directories.
Click to hide internal directories.