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:1008
    func addHandlers(_ handlers: [ChannelHandler], position: ChannelPipeline.Position = .last) -> EventLoopFuture<Void>

    Parameters

    handlers

    The array of 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.

    Other members in extension

    Types

    • enum Position

      A Position within the ChannelPipeline used to insert handlers into the ChannelPipeline.

    • struct SynchronousOperations

      A view of a ChannelPipeline which may be used to invoke synchronous operations.

    Type members

    • init(channel: 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.

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces