mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-15 17:38:53 +08:00
Mark FixedLengthFrameDecoder
non-Sendable
This commit is contained in:
parent
572c1cb16c
commit
daae52ce76
@ -28,17 +28,14 @@ import NIOCore
|
|||||||
/// | ABC | DEF | GHI |
|
/// | ABC | DEF | GHI |
|
||||||
/// +-----+-----+-----+
|
/// +-----+-----+-----+
|
||||||
///
|
///
|
||||||
public final class FixedLengthFrameDecoder: ByteToMessageDecoder, NIOSendable {
|
public final class FixedLengthFrameDecoder: ByteToMessageDecoder {
|
||||||
/// Data type we receive.
|
/// Data type we receive.
|
||||||
public typealias InboundIn = ByteBuffer
|
public typealias InboundIn = ByteBuffer
|
||||||
/// Data type we send to the next stage.
|
/// Data type we send to the next stage.
|
||||||
public typealias InboundOut = ByteBuffer
|
public typealias InboundOut = ByteBuffer
|
||||||
|
|
||||||
@available(*, deprecated, message: "No longer used")
|
@available(*, deprecated, message: "No longer used")
|
||||||
public var cumulationBuffer: ByteBuffer? {
|
public var cumulationBuffer: ByteBuffer?
|
||||||
get { nil }
|
|
||||||
set { /* discard newValue */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
private let frameLength: Int
|
private let frameLength: Int
|
||||||
|
|
||||||
@ -79,3 +76,8 @@ public final class FixedLengthFrameDecoder: ByteToMessageDecoder, NIOSendable {
|
|||||||
return .needMoreData
|
return .needMoreData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if swift(>=5.6)
|
||||||
|
@available(*, unavailable)
|
||||||
|
extension FixedLengthFrameDecoder: Sendable {}
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user