addHandlers(_:position:)

Adds the provided channel handlers to the pipeline in the order given, taking account of the behaviour of ChannelHandler.add(first:).

ChannelPipeline.swift:1116
@preconcurrency func addHandlers(_ handlers: any ChannelHandler & Sendable..., position: ChannelPipeline.Position = .last) -> EventLoopFuture<Void>

Parameters

handlers

One or more ChannelHandlers to be added.

position

The position in the ChannelPipeline to add handlers. Defaults to .last.

Returns

A future that will be completed when all of the supplied ChannelHandlers were added.