mqttserver

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMqttServer

func NewMqttServer() typex.XPlugin

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) KickOut

func (s *MqttServer) KickOut(clientid string) bool

* * 把某个客户端给踢下线 *

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) Start

func (s *MqttServer) Start(r typex.RuleX) error

func (*MqttServer) Stop

func (s *MqttServer) Stop() error

Jump to

Keyboard shortcuts

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