"refactor(serialize): 重构序列化模块路径并优化ServerInfo测试代码"
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"blazing/common/bytearray/serialize"
|
||||
"blazing/common/core/info"
|
||||
"blazing/common/serialize"
|
||||
"blazing/common/socket"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
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)
|
||||
socket.NewServer(socket.WithPort("9999")).Start()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user