broadcast

package
v0.0.0-...-1561e87 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Upgrader = websocket.Upgrader{
	CheckOrigin: func(r *http.Request) bool {
		return true
	},
}

Functions

func SendGameMsg

func SendGameMsg(gameID uint, msg interface{})

func ServeGameHub

func ServeGameHub(w http.ResponseWriter, r *http.Request, gameID uint)

Types

type GameBroadcast

type GameBroadcast struct {
	Upgrader  websocket.Upgrader
	Clients   map[*websocket.Conn]bool
	BroadCast chan interface{}
	M         sync.RWMutex
}

Jump to

Keyboard shortcuts

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