mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Motivation: I have several use-cases in my tests where it's necessary to have an EmbeddedChannel with multiple ChannelHandlers. Modifications: Add an initialiser that takes an array of ChannelHandlers, and adds them to the ChannelPipeline. Result: Previously: let embeddedChannel = EmbeddedChannel(handler: ...) try! embeddedChannel.pipeline.addHandlers([...]).wait() Now: let embeddedChannel = EmbeddedChannel(handlers: ...) Co-authored-by: Cory Benfield <lukasa@apple.com> Co-authored-by: Johannes Weiss <johannesweiss@apple.com>