From 7688cf712fe96f78e8a0ea2ed3f7014e301e8fef Mon Sep 17 00:00:00 2001 From: akash-55 <61596874+akash-55@users.noreply.github.com> Date: Wed, 9 Jun 2021 20:27:47 +0530 Subject: [PATCH] #1714 Update Codec.swift (#1873) * Update Codec.swift * Update Sources/NIO/Codec.swift Co-authored-by: Cory Benfield Co-authored-by: Cory Benfield --- Sources/NIO/Codec.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/NIO/Codec.swift b/Sources/NIO/Codec.swift index 5bd68f4e7..601496e2a 100644 --- a/Sources/NIO/Codec.swift +++ b/Sources/NIO/Codec.swift @@ -60,7 +60,9 @@ extension ByteToMessageDecoderError { /// /// ### Implementing ByteToMessageDecoder /// -/// A type that implements `ByteToMessageDecoder` must implement two methods: `decode` and `decodeLast`. +/// A type that implements `ByteToMessageDecoder` may implement two methods: decode and decodeLast. Implementations +/// must implement decode: if they do not implement decodeLast, a default implementation will be used that +/// simply calls decode. /// /// `decode` is the main decoding method, and is the one that will be called most often. `decode` is invoked /// whenever data is received by the wrapping `ByteToMessageHandler`. It is invoked with a `ByteBuffer` containing