From d48777b1ddc521c1050bed0dfee843447b631de0 Mon Sep 17 00:00:00 2001 From: godotg Date: Thu, 25 Jan 2024 15:45:32 +0800 Subject: [PATCH] perf[cs]: get protocolId by class type --- protocol/src/main/resources/csharp/ProtocolManagerTemplate.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/src/main/resources/csharp/ProtocolManagerTemplate.cs b/protocol/src/main/resources/csharp/ProtocolManagerTemplate.cs index 4a7e6a6c..7896d4c9 100644 --- a/protocol/src/main/resources/csharp/ProtocolManagerTemplate.cs +++ b/protocol/src/main/resources/csharp/ProtocolManagerTemplate.cs @@ -41,9 +41,9 @@ namespace zfoocs public static void Write(ByteBuffer buffer, object packet) { var protocolId = protocolIdMap[packet.GetType()]; - // 写入协议号 + // write protocol id to buffer buffer.WriteShort(protocolId); - // 写入包体 + // write packet GetProtocol(protocolId).Write(buffer, packet); }