mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
21 lines
464 B
Go
21 lines
464 B
Go
package iothub
|
|
|
|
import (
|
|
"pandax/iothub/hook_message_work"
|
|
"pandax/iothub/server/emqxserver"
|
|
"pandax/iothub/server/httpserver"
|
|
"pandax/iothub/server/tcpserver"
|
|
)
|
|
|
|
func InitIothub() {
|
|
service := hook_message_work.NewHookService()
|
|
// 初始化EMQX
|
|
go emqxserver.InitEmqxHook("", service)
|
|
// 初始化HTTP
|
|
go httpserver.InitHttpHook("", service)
|
|
//初始化TCP
|
|
go tcpserver.InitTcpHook("", service)
|
|
// 开启线程处理消息
|
|
go service.MessageWork()
|
|
}
|