feat(common): 重构数据包处理逻辑并添加全局 ID 生成器
- 引入 idgenerator-go 库,实现全局唯一 ID 生成 - 重构 Pack 函数,使用接口参数提高灵活性 - 修改 Player 结构,增加 MainConn 字段用于主连接 - 更新 SocketHandler_Tomee 中的 Data 字段标记 - 优化 Recv 函数中的数据解包和参数处理逻辑
This commit is contained in:
@@ -12,7 +12,11 @@ require (
|
||||
require (
|
||||
github.com/antchfx/xmlquery v1.4.4 // indirect
|
||||
github.com/antchfx/xpath v1.3.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/yitter/idgenerator-go v1.3.3 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
Reference in New Issue
Block a user