feat(common): 重构数据包处理逻辑并添加全局 ID 生成器
- 引入 idgenerator-go 库,实现全局唯一 ID 生成 - 重构 Pack 函数,使用接口参数提高灵活性 - 修改 Player 结构,增加 MainConn 字段用于主连接 - 更新 SocketHandler_Tomee 中的 Data 字段标记 - 优化 Recv 函数中的数据解包和参数处理逻辑
This commit is contained in:
11
logic/go.mod
11
logic/go.mod
@@ -5,6 +5,17 @@ go 1.19
|
||||
require github.com/lunixbochs/struc v0.0.0-20241101090106-8d528fa2c543
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.4.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/clbanning/mxj/v2 v2.7.0 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/panjf2000/ants/v2 v2.11.3 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user