mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-28 09:23:41 +08:00
Deprecate cumulationBuffer (#168)
Motivation: It is no longer used. Modifications: Deprecate the 3 cumulationBuffers Result: Less confusion and accidental usage.
This commit is contained in:
parent
f4359b987d
commit
ca22c12528
@ -32,6 +32,7 @@ public final class FixedLengthFrameDecoder: ByteToMessageDecoder {
|
|||||||
public typealias InboundIn = ByteBuffer
|
public typealias InboundIn = ByteBuffer
|
||||||
public typealias InboundOut = ByteBuffer
|
public typealias InboundOut = ByteBuffer
|
||||||
|
|
||||||
|
@available(*, deprecated, message: "No longer used")
|
||||||
public var cumulationBuffer: ByteBuffer?
|
public var cumulationBuffer: ByteBuffer?
|
||||||
|
|
||||||
private let frameLength: Int
|
private let frameLength: Int
|
||||||
|
@ -105,7 +105,8 @@ public final class LengthFieldBasedFrameDecoder: ByteToMessageDecoder {
|
|||||||
|
|
||||||
public typealias InboundIn = ByteBuffer
|
public typealias InboundIn = ByteBuffer
|
||||||
public typealias InboundOut = ByteBuffer
|
public typealias InboundOut = ByteBuffer
|
||||||
|
|
||||||
|
@available(*, deprecated, message: "No longer used")
|
||||||
public var cumulationBuffer: ByteBuffer?
|
public var cumulationBuffer: ByteBuffer?
|
||||||
private var readState: DecoderReadState = .waitingForHeader
|
private var readState: DecoderReadState = .waitingForHeader
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@ import NIOCore
|
|||||||
public class LineBasedFrameDecoder: ByteToMessageDecoder {
|
public class LineBasedFrameDecoder: ByteToMessageDecoder {
|
||||||
public typealias InboundIn = ByteBuffer
|
public typealias InboundIn = ByteBuffer
|
||||||
public typealias InboundOut = ByteBuffer
|
public typealias InboundOut = ByteBuffer
|
||||||
|
|
||||||
|
@available(*, deprecated, message: "No longer used")
|
||||||
public var cumulationBuffer: ByteBuffer?
|
public var cumulationBuffer: ByteBuffer?
|
||||||
// keep track of the last scan offset from the buffer's reader index (if we didn't find the delimiter)
|
// keep track of the last scan offset from the buffer's reader index (if we didn't find the delimiter)
|
||||||
private var lastScanOffset = 0
|
private var lastScanOffset = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user