websocket

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server WebSocket服务

func NewServer

func NewServer(cfg *config.Config, ws *webSocket.WebSocket) *Server

NewServer 创建WebSocket服务

func (*Server) Addr

func (s *Server) Addr() string

Addr 获取服务地址

func (*Server) IsEnabled

func (s *Server) IsEnabled() bool

func (*Server) Name

func (s *Server) Name() string

func (*Server) Start

func (s *Server) Start() error

Start 启动WebSocket服务

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop 停止WebSocket服务

Jump to

Keyboard shortcuts

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