addHandler(_:name:position:)

Add a ChannelHandler to the ChannelPipeline.

ChannelPipeline.swift:171
@preconcurrency func addHandler(_ handler: any ChannelHandler & Sendable, name: String? = nil, position: ChannelPipeline.Position = .last) -> EventLoopFuture<Void>

Parameters

name

the name to use for the ChannelHandler when it’s added. If none is specified it will generate a name.

handler

the ChannelHandler to add

position

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

Returns

the EventLoopFuture which will be notified once the ChannelHandler was added.