ws

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(out chan<- *Message, in <-chan *Message, ctx context.Context, cncl context.CancelFunc)

type Message

type Message struct {
	Type int
	Text []byte
}

type WebSocket

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

func New

func New(countMsg, bufferSize int, log logger.Logger) *WebSocket

func (*WebSocket) Handler

func (_sock *WebSocket) Handler(w http.ResponseWriter, r *http.Request, handler Handler) error

Jump to

Keyboard shortcuts

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