52 lines
980 B
Go
52 lines
980 B
Go
package main
|
||
|
||
import (
|
||
"fmt"
|
||
|
||
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
|
||
|
||
"blazing/common/socket"
|
||
"blazing/common/socket/handler"
|
||
_ "blazing/contrib/files/local"
|
||
"blazing/cool"
|
||
|
||
// Minio,按需启用
|
||
// _ "blazing/contrib/files/minio"
|
||
|
||
// 阿里云OSS,按需启用
|
||
// _ "blazing/contrib/files/oss"
|
||
|
||
// _ "blazing/contrib/drivers/sqlite"
|
||
|
||
_ "blazing/contrib/drivers/mysql"
|
||
|
||
//_ "blazing/contrib/drivers/pgsql"
|
||
|
||
_ "blazing/modules"
|
||
|
||
"github.com/gogf/gf/v2/os/gctx"
|
||
|
||
"blazing/login/internal/cmd"
|
||
)
|
||
|
||
func main() {
|
||
go Start(cool.Config.Port)
|
||
cmd.Main.Run(gctx.New())
|
||
}
|
||
|
||
func Start(port string) {
|
||
|
||
head := handler.NewTomeeHandler()
|
||
head.Callback = recv
|
||
socket.NewServer(socket.WithPort(port), socket.WithSocketHandler(head)).Start()
|
||
}
|
||
func recv(data handler.TomeeHeader) {
|
||
|
||
fmt.Println(data)
|
||
|
||
// 处理接收到的TomeeHeader数据
|
||
// fmt.Println("收到数据:", data)
|
||
//processWithReflection(data)
|
||
|
||
}
|