From 52ea55ac392739d03488af7550b7de7064503c24 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Thu, 16 Oct 2025 16:58:20 +0000 Subject: [PATCH] =?UTF-8?q?```fix(socket):=20=E5=B0=86TCP=E5=89=A9?= =?UTF-8?q?=E4=BD=99=E6=95=B0=E6=8D=AE=E8=BE=93=E5=87=BA=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8D=81=E5=85=AD=E8=BF=9B=E5=88=B6=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2```?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/socket/ServerEvent.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/socket/ServerEvent.go b/common/socket/ServerEvent.go index 12d8c489..db389bdc 100644 --- a/common/socket/ServerEvent.go +++ b/common/socket/ServerEvent.go @@ -2,6 +2,7 @@ package socket import ( "context" + "encoding/hex" "fmt" "log" "os" @@ -165,7 +166,8 @@ func (s *Server) handleTcp(conn gnet.Conn) (action gnet.Action) { if conn.InboundBuffered() > 0 { t, _ := conn.Peek(conn.InboundBuffered()) - fmt.Println("剩余数据", conn.InboundBuffered(), string(t)) + + fmt.Println("剩余数据", conn.InboundBuffered(), hex.EncodeToString(t)) if err := conn.Wake(nil); err != nil { // wake up the connection manually to avoid missing the leftover data logging.Errorf("failed to wake up the connection, %v", err) return gnet.Close