Documentation
¶
Overview ¶
Package websocket 接收客户端消息,根据消息内容解包,调用对应模块API处理,然后封装返回
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClientNotFound = errors.New("client not found")
)
Functions ¶
This section is empty.
Types ¶
type ActionWrap ¶
type DeviceWrap ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server WebSocket服务端
func NewWebSocketServer ¶
func NewWebSocketServer() *Server
func (*Server) AcceptWebSocket ¶
func (*Server) OnDeviceStateChange ¶
OnDeviceStateChange 设备状态改变回调,会广播给所有客户端,并且触发场景
Click to show internal directories.
Click to hide internal directories.