ginwebsocket

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 5 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)

func (*Router) RegisterHandler

func (r *Router) RegisterHandler(engine *gin.Engine)

func (*Router) SetAuthorizationFunc

func (r *Router) SetAuthorizationFunc(f func(ctx context.Context, r *http.Request, w http.ResponseWriter) (returnCtx context.Context, isAuthorized bool, userId int64))

func (*Router) SetBeforeFunc added in v0.1.7

func (r *Router) SetBeforeFunc(f func(ctx context.Context, r *http.Request, w http.ResponseWriter) (returnCtx context.Context, isAuthorized bool, userId int64))

func (*Router) SetClientCloseFunc

func (r *Router) SetClientCloseFunc(f func(context.Context, string))

Jump to

Keyboard shortcuts

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