websocket_wrapper

package
v0.0.0-...-b30106d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	ReadMessage() (messageType int, p []byte, err error)
	WriteMessage(messageType int, data []byte) error
	WriteJSON(v interface{}) error
	Close() error
}

Conn - Interface specifying methods needed to be satisfied by the websocket connection

type Upwrapper

type Upwrapper struct {
	Upgrader    *websocket.Upgrader
	CheckOrigin func(r *http.Request) bool
}

Upwrapper - Upgrader wrapper

func (Upwrapper) Upgrade

func (a Upwrapper) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (Conn, error)

Upgrade - expose the websocket upgrader function

Jump to

Keyboard shortcuts

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