fireChannelRead(_:)
ChannelPipeline.swift:723This declaration is deprecated: NIOAny is not Sendable. Avoid wrapping the value in NIOAny to silence this warning.
func fireChannelRead(_ data: NIOAny) This declaration is deprecated: NIOAny is not Sendable. Avoid wrapping the value in NIOAny to silence this warning.
func fireChannelRead(_ data: NIOAny) import NIOCoreThe core abstractions that make up SwiftNIO.
final class ChannelPipelineA list of ChannelHandlers that handle or intercept inbound events and outbound operations of a Channel. ChannelPipeline implements an advanced form of the Intercepting Filter pattern to give a user full control over how an event is handled and how the ChannelHandlers in a pipeline interact with each other.
struct NIOAnyNIOAny is an opaque container for values of any type, similar to Swift’s builtin Any type. Contrary to Any the overhead of NIOAny depends on the the type of the wrapped value. Certain types that are important for the performance of a SwiftNIO application like ByteBuffer, FileRegion and AddressEnvelope<ByteBuffer> can be expected to be wrapped almost without overhead. All others will have similar performance as if they were passed as an Any as NIOAny just like Any will contain them within an existential container.
init(channel: any Channel) Create ChannelPipeline for a given Channel. This method should never be called by the end-user directly: it is only intended for use with custom Channel implementations. Users should always use channel.pipeline to access the ChannelPipeline for a Channel.
var debugDescription: String { get }let eventLoop: any EventLoopThe EventLoop that is used by the underlying Channel.
var syncOperations: ChannelPipeline.SynchronousOperations { get }Returns a view of operations which can be performed synchronously on this pipeline. All operations must be called on the event loop.
@preconcurrency func addHandler(_ handler: any ChannelHandler & Sendable, name: String? = nil, position: ChannelPipeline.Position = .last) -> EventLoopFuture<Void> Add a ChannelHandler to the ChannelPipeline.
@preconcurrency func addHandler(_ handler: any ChannelHandler & Sendable, name: String? = nil, position: ChannelPipeline.Position = .last) async throws @preconcurrency func addHandlers(_ handlers: any ChannelHandler & Sendable..., position: ChannelPipeline.Position = .last) -> EventLoopFuture<Void> Adds the provided channel handlers to the pipeline in the order given, taking account of the behaviour of ChannelHandler.add(first:).
@preconcurrency func addHandlers(_ handlers: [any ChannelHandler & Sendable], position: ChannelPipeline.Position = .last) -> EventLoopFuture<Void> Adds the provided channel handlers to the pipeline in the order given, taking account of the behaviour of ChannelHandler.add(first:).
@preconcurrency func addHandlers(_ handlers: any ChannelHandler & Sendable..., position: ChannelPipeline.Position = .last) async throws @preconcurrency func addHandlers(_ handlers: [any ChannelHandler & Sendable], position: ChannelPipeline.Position = .last) async throws func bind(to address: SocketAddress, promise: EventLoopPromise<Void>?) func close(mode: CloseMode = .all, promise: EventLoopPromise<Void>?) func connect(to address: SocketAddress, promise: EventLoopPromise<Void>?) func containsHandler(name: String) -> EventLoopFuture<Void> Returns if the ChannelHandler of the given type is contained in the pipeline.
@preconcurrency func containsHandler<Handler>(type: Handler.Type) -> EventLoopFuture<Void> where Handler : ChannelHandler Returns if the ChannelHandler of the given type is contained in the pipeline.
@preconcurrency func context<Handler>(handlerType: Handler.Type) -> EventLoopFuture<ChannelHandlerContext> where Handler : ChannelHandler Returns the ChannelHandlerContext that belongs to a ChannelHandler of the given type.
func context(name: String) -> EventLoopFuture<ChannelHandlerContext> Returns the ChannelHandlerContext that belongs to a ChannelHandler.
func fireChannelActive() func fireChannelInactive() func fireChannelRead<T>(_ data: T) where T : Sendable func fireChannelReadComplete() func fireChannelRegistered() func fireChannelUnregistered() func fireChannelWritabilityChanged() func fireErrorCaught(_ error: any Error) @preconcurrency func fireUserInboundEventTriggered(_ event: any Sendable) func flush() @preconcurrency func handler<Handler>(type _: Handler.Type) -> EventLoopFuture<Handler> where Handler : ChannelHandler Returns the first ChannelHandler of the given type.
func inboundBufferedBytes() -> EventLoopFuture<Int> Retrieve the total number of bytes buffered for inbound.
func outboundBufferedBytes() -> EventLoopFuture<Int> Retrieve the total number of bytes buffered for outbound.
func read() func register(promise: EventLoopPromise<Void>?) @preconcurrency func removeHandler(_ handler: any RemovableChannelHandler & Sendable) -> EventLoopFuture<Void> Remove a ChannelHandler from the ChannelPipeline.
@preconcurrency func removeHandler(_ handler: any RemovableChannelHandler & Sendable) async throws @preconcurrency func removeHandler(_ handler: any RemovableChannelHandler & Sendable, promise: EventLoopPromise<Void>?) Remove a ChannelHandler from the ChannelPipeline.
func removeHandler(name: String) -> EventLoopFuture<Void> Remove a ChannelHandler from the ChannelPipeline.
func removeHandler(name: String) async throws func removeHandler(name: String, promise: EventLoopPromise<Void>?) Remove a ChannelHandler from the ChannelPipeline.
@preconcurrency func triggerUserOutboundEvent(_ event: any Sendable, promise: EventLoopPromise<Void>?) func write<T>(_ data: T, promise: EventLoopPromise<Void>?) where T : Sendable func writeAndFlush<T>(_ data: T, promise: EventLoopPromise<Void>?) where T : Sendable @preconcurrency enum PositionA Position within the ChannelPipeline used to insert handlers into the ChannelPipeline.
struct SynchronousOperationsA view of a ChannelPipeline which may be used to invoke synchronous operations.
@preconcurrency func context(handler: any ChannelHandler & Sendable) async throws -> ChannelHandlerContext @preconcurrency func context(handler: any ChannelHandler & Sendable) -> EventLoopFuture<ChannelHandlerContext> Returns the ChannelHandlerContext that belongs to a ChannelHandler.
@preconcurrency func context<Handler>(handlerType: Handler.Type) async throws -> ChannelHandlerContext where Handler : ChannelHandler func context(name: String) async throws -> ChannelHandlerContext func removeHandler(context: ChannelHandlerContext) -> EventLoopFuture<Void> Remove a ChannelHandler from the ChannelPipeline.
func removeHandler(context: ChannelHandlerContext) async throws func removeHandler(context: ChannelHandlerContext, promise: EventLoopPromise<Void>?) Remove a ChannelHandler from the ChannelPipeline.
func write(_ data: NIOAny, promise: EventLoopPromise<Void>?) func writeAndFlush(_ data: NIOAny, promise: EventLoopPromise<Void>?)