ginwebsocket

package
v4.0.11 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(path, configPath string) *Router

func (*Router) GetClientManager

func (r *Router) GetClientManager() *websocket.ClientManager

func (*Router) OnTextMessageController

func (r *Router) OnTextMessageController(scene string, controller websocket.TextMessageController) error

func (*Router) Register

func (r *Router) Register(rg *gin.RouterGroup)

Register 将 WebSocket 路由注册到指定 RouterGroup,供 HTTPHandler 使用。

func (*Router) SetAuthorizationFunc

func (r *Router) SetAuthorizationFunc(f websocket.AuthorizationFunc)

func (*Router) SetBeforeFunc

func (r *Router) SetBeforeFunc(f websocket.AuthorizationFunc)

func (*Router) SetClientCloseFunc

func (r *Router) SetClientCloseFunc(f websocket.ClientCloseFunc)

Jump to

Keyboard shortcuts

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