websocket

package
v0.0.0-...-6e5121b Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MPL-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientNotFound = errors.New("could not find client")
)

Functions

This section is empty.

Types

type ConnectionError

type ConnectionError struct {
	ClientID string
	// contains filtered or unexported fields
}

func NewConnectionError

func NewConnectionError(t ConnectionErrorType, id string) ConnectionError

type ConnectionErrorType

type ConnectionErrorType int
const (
	ClientNotFound ConnectionErrorType = iota // could not find client
)

func (ConnectionErrorType) String

func (i ConnectionErrorType) String() string

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) Add

func (m *Manager) Add(ws *gorilla.Conn) string

func (*Manager) CloseConn

func (m *Manager) CloseConn(id string) bool

func (*Manager) Count

func (m *Manager) Count() int

func (*Manager) Get

func (m *Manager) Get(id string) (*gorilla.Conn, bool)

func (*Manager) Info

func (m *Manager) Info(id string)

func (*Manager) Send

func (m *Manager) Send(msg []byte, id string) error

Jump to

Keyboard shortcuts

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