Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Sources/NIOCore/Channel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,26 @@ public protocol Channel: AnyObject, ChannelOutboundInvoker, _NIOPreconcurrencySe
@preconcurrency
func write<T: Sendable>(_ any: T) -> EventLoopFuture<Void>

#if compiler(>=6.0)
/// Write data into the `Channel`, automatically wrapping with `NIOAny`.
///
/// - seealso: `ChannelOutboundInvoker.write`.
func write<T>(_ any: sending T) -> EventLoopFuture<Void>
#endif

/// Write data into the `Channel`, automatically wrapping with `NIOAny`.
///
/// - seealso: `ChannelOutboundInvoker.write`.
@preconcurrency
func write<T: Sendable>(_ any: T, promise: EventLoopPromise<Void>?)

#if compiler(>=6.0)
/// Write data into the `Channel`, automatically wrapping with `NIOAny`.
///
/// - seealso: `ChannelOutboundInvoker.write`.
func write<T>(_ any: sending T, promise: EventLoopPromise<Void>?)
#endif

/// Write and flush data into the `Channel`, automatically wrapping with `NIOAny`.
///
/// - seealso: `ChannelOutboundInvoker.writeAndFlush`.
Expand Down
Loading