Required Instance Methodswift-nio 2.72.0NIOCore
decodeLast(buffer:seenEOF:)
Decode from a ByteBuffer
when no more data is incoming.
mutating func decodeLast(buffer: inout ByteBuffer, seenEOF: Bool) throws -> InboundOut?
Parameters
Returns
A message if one can be decoded or nil
if no more messages can be produced.
Like with decode
, this method will be called in a loop until either nil
is returned from the method or until the input ByteBuffer
has no more readable bytes. If non-nil
is returned and the ByteBuffer
contains more readable bytes, this method will immediately be invoked again.
Once nil
is returned, neither decode
nor decodeLast
will be called again. If there are no bytes left, decodeLast
will be called once with an empty buffer.
Other requirements
Type members
associatedtype InboundOut
The decoded type this
NIOSingleStepByteToMessageDecoder
decodes to. To conform toByteToMessageDecoder
it must be calledInboundOut
- see https://bugs.swift.org/browse/SR-11868.
Instance members
func decode(buffer: inout ByteBuffer
) throws -> InboundOut? Decode from a
ByteBuffer
.