wsKit

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindGroup

func BindGroup(conn *wsConnection, group string)

BindGroup 可以多次绑定

func BindUniqueId

func BindUniqueId(conn *wsConnection, uniqueId string)

func BindUser

func BindUser(conn *wsConnection, user string)

func NewWsConnection

func NewWsConnection() *wsConnection

func PolyfillWsConnection

func PolyfillWsConnection(req *http.Request) error

PolyfillWsConnection 检查并处理websocket连接.(不再强制需要nginx设置websocket穿透) PS: 还有问题的话,可以参考下:"github.com/gorilla/websocket"中server.go的Upgrade方法.

func UnbindGroup

func UnbindGroup(conn *wsConnection)

func WebSocketHandler

func WebSocketHandler(ctx *gin.Context)

WebSocketHandler websocket服务器.

Types

This section is empty.

Jump to

Keyboard shortcuts

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