"refactor(serialize): 重构序列化模块路径并优化ServerInfo测试代码"
This commit is contained in:
@@ -1,20 +1,19 @@
|
|||||||
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:=info.NewServerInfo()
|
tt.OnlineID = 99
|
||||||
tt.OnlineID=99
|
tt.IP = []byte("127.0.0.1")
|
||||||
tt.IP=[]byte("127.0.0.1")
|
tt1 := serialize.NewDefaultPacketHandler[info.ServerInfo]()
|
||||||
tt1:=serialize.NewDefaultPacketHandler[info.ServerInfo]()
|
tg, _ := tt1.Serialize(*tt)
|
||||||
tg,_:=tt1.Serialize(*tt)
|
|
||||||
|
|
||||||
fmt.Println(tg)
|
fmt.Println(tg)
|
||||||
socket.NewServer(socket.WithPort("9999")).Start()
|
socket.NewServer(socket.WithPort("9999")).Start()
|
||||||
|
|||||||
Reference in New Issue
Block a user