websocket

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender interface {
	SendToID(to string, msgType string, data interface{}) error
	SendToProtocol(to string, msgType string, data interface{}) error
	BroadcastWithFilter(msgType string, data interface{}, fn func(*melody.Session) bool) error
}

func NewWebsocketSender

func NewWebsocketSender(m *melody.Melody) Sender

type SessionKey

type SessionKey string
const (
	KeyProtocol SessionKey = "protocol"
	KeyID       SessionKey = "ID"
)

func (SessionKey) String

func (sk SessionKey) String() string

Jump to

Keyboard shortcuts

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