config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package config

Index

Constants

This section is empty.

Variables

View Source
var WSDefaultUpdate = WSUpdateConf{
	HandshakeTimeout: time.Second * 10,
	ReadBufferSize:   1024,
	WriteBufferSize:  1024,
	CheckOrigin: func(r *http.Request) bool {
		return true
	},
}

WSDefaultUpdate 默认升级配置

Functions

func SetCheckOrigin

func SetCheckOrigin(f func(r *http.Request) bool)

func Upgrade

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

Types

type WSUpdateConf

type WSUpdateConf = websocket.Upgrader

Jump to

Keyboard shortcuts

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