websocket

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 6 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 {
	net.Conn
	Subprotocol() string // 获取子协议
	TextTransport() Conn // 获取文本传输通道
	Path() string        // 接入时的ws后的路径
	Username() string    // 接入是http验证后的用户名称
}

Conn websocket连接

func TryUpgrade

func TryUpgrade(w http.ResponseWriter, r *http.Request, path, username string) (Conn, bool)

TryUpgrade attempts to upgrade an HTTP request to rtsp/wsp over websocket.

Jump to

Keyboard shortcuts

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