hub

package
v0.0.0-...-891dfff Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

type Hub struct {
	Clients    map[*websocket.Conn]bool
	Register   chan *websocket.Conn
	Unregister chan *websocket.Conn
	Broadcast  chan interface{}
	Shutdown   chan bool
}

func New

func New() *Hub

func (*Hub) Add

func (h *Hub) Add(c *websocket.Conn)

func (*Hub) Close

func (h *Hub) Close()

func (*Hub) Prune

func (h *Hub) Prune() int

func (*Hub) Publish

func (h *Hub) Publish(msg interface{})

func (*Hub) Remove

func (h *Hub) Remove(c *websocket.Conn)

Jump to

Keyboard shortcuts

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