ws

package
v0.0.0-...-7a9ebb2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(c *gin.Context)

func MixManager

func MixManager(ctx context.Context, m *Manager) context.Context

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func PickManager

func PickManager(ctx context.Context) *Manager

func (*Manager) BroadCast

func (m *Manager) BroadCast(jso interface{}, ids ...string) error

func (*Manager) Delete

func (m *Manager) Delete(id string)

func (*Manager) Load

func (m *Manager) Load(id string) (*websocket.Conn, bool)

func (*Manager) Send

func (m *Manager) Send(jso interface{}, id string) error

func (*Manager) Store

func (m *Manager) Store(id string, conn *websocket.Conn) error

Store when id already exists, an error will be raised

Jump to

Keyboard shortcuts

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