Documentation ¶
Index ¶
- func NewMqttServer() typex.XPlugin
- type Client
- type MqttServer
- func (s *MqttServer) Init(config *ini.Section) error
- func (s *MqttServer) KickOut(clientid string) bool
- func (s *MqttServer) ListClients(offset, count int) []Client
- func (s *MqttServer) PluginMetaInfo() typex.XPluginMetaInfo
- func (s *MqttServer) Service(arg typex.ServiceArg) typex.ServiceResult
- func (s *MqttServer) Start(r typex.RuleX) error
- func (s *MqttServer) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMqttServer ¶
Types ¶
type Client ¶
type Client struct { ID string `json:"id"` Remote string `json:"remote"` Listener string `json:"listener"` Username string `json:"username"` CleanSession bool `json:"cleanSession"` Topics []_topic `json:"topics"` }
* * 获取当前连接进来的MQTT客户端 *
type MqttServer ¶
type MqttServer struct { Enable bool Host string Port int // contains filtered or unexported fields }
func (*MqttServer) Init ¶
func (s *MqttServer) Init(config *ini.Section) error
func (*MqttServer) ListClients ¶
func (s *MqttServer) ListClients(offset, count int) []Client
func (*MqttServer) PluginMetaInfo ¶
func (s *MqttServer) PluginMetaInfo() typex.XPluginMetaInfo
func (*MqttServer) Service ¶
func (s *MqttServer) Service(arg typex.ServiceArg) typex.ServiceResult
* * 服务调用接口 *
func (*MqttServer) Stop ¶
func (s *MqttServer) Stop() error
Click to show internal directories.
Click to hide internal directories.