"refactor(serialize): 重构序列化模块路径并优化ServerInfo测试代码"

This commit is contained in:
1
2025-06-22 00:58:47 +00:00
parent ef65de818b
commit f318eaef61

View File

@@ -1,21 +1,20 @@
package main package main
import ( import (
"blazing/common/bytearray/serialize"
"blazing/common/core/info" "blazing/common/core/info"
"blazing/common/serialize"
"blazing/common/socket" "blazing/common/socket"
"fmt" "fmt"
) )
func main() { func main() {
tt := info.NewServerInfo()
tt.OnlineID = 99
tt.IP = []byte("127.0.0.1")
tt1 := serialize.NewDefaultPacketHandler[info.ServerInfo]()
tg, _ := tt1.Serialize(*tt)
tt:=info.NewServerInfo()
tt.OnlineID=99
tt.IP=[]byte("127.0.0.1")
tt1:=serialize.NewDefaultPacketHandler[info.ServerInfo]()
tg,_:=tt1.Serialize(*tt)
fmt.Println(tg) fmt.Println(tg)
socket.NewServer(socket.WithPort("9999")).Start() socket.NewServer(socket.WithPort("9999")).Start()
} }