diff --git a/Sources/NIOCore/Channel.swift b/Sources/NIOCore/Channel.swift index d86362f6e9..58ef2332b2 100644 --- a/Sources/NIOCore/Channel.swift +++ b/Sources/NIOCore/Channel.swift @@ -158,12 +158,26 @@ public protocol Channel: AnyObject, ChannelOutboundInvoker, _NIOPreconcurrencySe @preconcurrency func write(_ any: T) -> EventLoopFuture + #if compiler(>=6.0) + /// Write data into the `Channel`, automatically wrapping with `NIOAny`. + /// + /// - seealso: `ChannelOutboundInvoker.write`. + func write(_ any: sending T) -> EventLoopFuture + #endif + /// Write data into the `Channel`, automatically wrapping with `NIOAny`. /// /// - seealso: `ChannelOutboundInvoker.write`. @preconcurrency func write(_ any: T, promise: EventLoopPromise?) + #if compiler(>=6.0) + /// Write data into the `Channel`, automatically wrapping with `NIOAny`. + /// + /// - seealso: `ChannelOutboundInvoker.write`. + func write(_ any: sending T, promise: EventLoopPromise?) + #endif + /// Write and flush data into the `Channel`, automatically wrapping with `NIOAny`. /// /// - seealso: `ChannelOutboundInvoker.writeAndFlush`.