From 28f57a2635dc6d2fb101f3c64cc3db57cf963276 Mon Sep 17 00:00:00 2001 From: godotg Date: Thu, 22 Sep 2022 18:50:19 +0800 Subject: [PATCH] =?UTF-8?q?doc[protocol]:=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocol/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/README.md b/protocol/README.md index cee78c9b..33f3f8c3 100644 --- a/protocol/README.md +++ b/protocol/README.md @@ -105,7 +105,7 @@ cpu: i9900k - 协议号定义为short类型是为了减少包体积和内存大小,一个包可以减少2个byte,每个协议的在应用内存也可以降低6byte(protocols + IProtocolRegistration + protocolIdMap) ``` -改成int只需要全局替换short protocolId() -> int protocolId() ,代码里大部分都是用的 var 自动推导,只需要花10分钟就能改好,没有什么改动成本 +一个项目的协议体类很难超过3w,会有工具自动把你的协议号打包的紧凑一点,这样你的协议号就不会超过3w了 ``` - 协议类必须标注协议号,有两种方式