ws

package
v0.0.0-...-faa9808 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL