Documentation ¶
Index ¶
- func CheckMqttClients(ms *MqttServer)
- func CloseServer(ms *MqttServer)
- func GetMqttDataLength(data []byte, num uint32) (uint32, uint32)
- func HandleMqttClientRequest(ms *MqttServer, mqttclient *MqttClient)
- func HasSliceValue(arr []*string, d string) bool
- func ListenFastHttpWebSocket(ms *MqttServer, ctx *fasthttp.RequestCtx, params *WebSocketParam) error
- func ListenNetHttpWebSocket(ms *MqttServer, w http.ResponseWriter, r *http.Request, params *WebSocketParam) error
- func PublishData(ms *MqttServer, topic string, msg []byte)
- func RemoveClientFromMqttClients(ms *MqttServer, mqttclient *MqttClient)
- func RemoveSliceByValue(arrs []*string, d string) []*string
- func SendToClient(ms *MqttServer, b, bv5 []byte, topic string)
- func StartTcpServer(ms *MqttServer, tcpListen *net.TCPListener)
- func Subscribe(ms *MqttServer, topics []string)
- func SubscribeAll(ms *MqttServer, topics []string)
- func Unsubscribe(ms *MqttServer, topics []string)
- type Callback
- type MqttClient
- type MqttServer
- type WebSocketParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMqttClients ¶ added in v1.1.1
func CheckMqttClients(ms *MqttServer)
func CloseServer ¶
func CloseServer(ms *MqttServer)
func HandleMqttClientRequest ¶
func HandleMqttClientRequest(ms *MqttServer, mqttclient *MqttClient)
func HasSliceValue ¶
func ListenFastHttpWebSocket ¶
func ListenFastHttpWebSocket(ms *MqttServer, ctx *fasthttp.RequestCtx, params *WebSocketParam) error
func ListenNetHttpWebSocket ¶
func ListenNetHttpWebSocket(ms *MqttServer, w http.ResponseWriter, r *http.Request, params *WebSocketParam) error
func PublishData ¶
func PublishData(ms *MqttServer, topic string, msg []byte)
func RemoveClientFromMqttClients ¶
func RemoveClientFromMqttClients(ms *MqttServer, mqttclient *MqttClient)
func RemoveSliceByValue ¶
func SendToClient ¶ added in v1.2.0
func SendToClient(ms *MqttServer, b, bv5 []byte, topic string)
func StartTcpServer ¶
func StartTcpServer(ms *MqttServer, tcpListen *net.TCPListener)
func Subscribe ¶ added in v1.1.4
func Subscribe(ms *MqttServer, topics []string)
func SubscribeAll ¶ added in v1.1.5
func SubscribeAll(ms *MqttServer, topics []string)
func Unsubscribe ¶ added in v1.1.4
func Unsubscribe(ms *MqttServer, topics []string)
Types ¶
type MqttClient ¶
type MqttClient struct {
// contains filtered or unexported fields
}
func (MqttClient) Close ¶
func (c MqttClient) Close() error
type MqttServer ¶
type MqttServer struct {
// contains filtered or unexported fields
}
func StartServer ¶
type WebSocketParam ¶
type WebSocketParam struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.