Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMatchWSHandler ¶
func NewMatchWSHandler(svc domain.IPokewarService, router *gin.RouterGroup)
Types ¶
type MatchWSHandler ¶
type MatchWSHandler struct { Svc domain.IPokewarService Monsters map[string][]*domain.Monster GamePlayers map[string][]*battleroyale.Player BattleData map[string]*domain.Battle }
func (*MatchWSHandler) Run ¶
func (handler *MatchWSHandler) Run(ctx *gin.Context)
Run function is a WebSocket handler for a Battleroyale game. It handles incoming messages from clients and performs the appropriate action based on the value of the "action" field in the message.
Click to show internal directories.
Click to hide internal directories.