websocket

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUpgrader = &Upgrader{
	HandshakeTimeout: time.Second * 5,
	ReadBufferSize:   units.Kilobyte * 65,
	WriteBufferSize:  units.Kilobyte * 65,
	CheckOrigin:      func(r *http.Request) bool { return true },
}

Functions

func Dial

func Dial(addr string) (sockets.Conn, error)

func NewServer

func NewServer(upgrader *Upgrader) sockets.Server

NewServer creates new Server based on Websocket protocol

Listen method accepts path to handle incoming connections (path is used to create handler for restListener)

Types

type Upgrader

type Upgrader websocket.Upgrader

Jump to

Keyboard shortcuts

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