Documentation ¶ Index ¶ type Server func NewServer(cfg *config.Config, ws *webSocket.WebSocket) *Server func (s *Server) Addr() string func (s *Server) IsEnabled() bool func (s *Server) Name() string func (s *Server) Start() error func (s *Server) Stop(ctx context.Context) error 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服务 Source Files ¶ View all Source files server.go Click to show internal directories. Click to hide internal directories.