Skip to content

Commit c0d8b49

Browse files
committed
completed 解码分隔符和基于长度的协议
1 parent c09c521 commit c0d8b49

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CORE FUNCTIONS/Decoding delimited and length-based protocols.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ Listing 8.10 Decoder for the command and the handler
175175
}
176176
}
177177

178-
1. Add a LengthFieldBasedFrameDecoder to extract frames based on the encoded length in the first 8
179-
bytes of the frame.
180-
2. Add a FrameHandler to handle each frame.
181-
3. Do something with the frame data.
178+
1. 添加一个 LengthFieldBasedFrameDecoder ,用于提取基于帧编码长度8个字节的帧。
179+
2. 添加一个 FrameHandler 用来处理每帧
180+
3. 处理帧数据
181+
182+
总而言之,本部分探讨了 Netty 提供的编解码器支持协议,包括定义特定的分隔符的字节流的结构或协议帧的长度。这些编解码器非常有用。
182183

0 commit comments

Comments
 (0)