fix(socket): 修复TCP数据处理和编解码逻辑

移除调试日志注释,修正socket编解码器中的数据丢弃逻辑。
更新TomeeSocketCodec.Decode方法,确保正确处理数据包长度并丢弃已读取的数据。
This commit is contained in:
2025-10-19 02:08:27 +08:00
parent 7de149d946
commit 7946ed190f
2 changed files with 3 additions and 1 deletions

View File

@@ -175,6 +175,7 @@ func (s *Server) handleTcp(conn gnet.Conn) (action gnet.Action) {
if data != nil {
//client := conn.RemoteAddr().String()
//cool.Loger.Debug(context.Background(), "数据", hex.EncodeToString(data))
_ = s.workerPool.Submit(func() { //TODO 这里可能存在顺序执行问题,待修复
//todo 这里待实现注入player实体
s.handler.Handle(conn, data)