NIOExtras is a good place for code that is related to NIO but not core. It can also be used to incubate APIs for tasks that are possible with core-NIO but are cumbersome today.
What makes a good contribution to NIOExtras?
All code will go through code review like in the other repositories related to the SwiftNIO project.
swift-nio-extras part of the SwiftNIO 2 family of repositories and depends on the following:
swift-nio, version 2.30.0 or better.
zlib and its development headers installed on the system. But don't worry, you'll find
zlib on pretty much any UNIX system that can compile any sort of code.
To depend on
swift-nio-extras, put the following in the
dependencies of your
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.0.0"),
The most recent versions of SwiftNIO Extras support Swift 5.7.1 and newer. The minimum Swift version supported by SwiftNIO Extras releases are detailed below:
|Minimum Swift Version
1.0.0 ..< 1.10.0
1.10.0 ..< 1.11.0
1.11.0 ..< 1.14.0
1.14.0 ..< 1.19.0
1.19.0 ..< 1.20.0
nio-extras-0.1 branch, you can find the
swift-nio-extras version for the SwiftNIO 1 family. It requires Swift 4.1 or better.
QuiescingHelper: Helps to quiesce
a server by notifying user code when all previously open connections have closed.
LineBasedFrameDecoder Splits incoming
ByteBuffers on line endings.
FixedLengthFrameDecoder Splits incoming
ByteBuffers by a fixed number of bytes.
LengthFieldBasedFrameDecoder Splits incoming
ByteBuffers by a number of bytes specified in a fixed length header contained within the buffer.
LengthFieldPrepender Prepends the number of bytes to outgoing
ByteBuffers as a fixed length header. Can be used in a codec pair with the
RequestResponseHandler Matches a request and a promise with the corresponding response.
HTTPResponseCompressor Compresses the body of every HTTP/1 response message.
DebugInboundsEventHandler Prints out all inbound events that travel through the
DebugOutboundsEventHandler Prints out all outbound events that travel through the
ChannelHandler that writes
.pcap containing the traffic of the
ChannelPipeline that you can inspect with Wireshark/tcpdump.
ChannelHandler that translates HTTP/1 messages into shared HTTP types for the client side.
ChannelHandler that translates HTTP/1 messages into shared HTTP types for the server side.
ChannelHandler that translates shared HTTP types into HTTP/1 messages for the client side for compatibility purposes.
ChannelHandler that translates shared HTTP types into HTTP/1 messages for the server side for compatibility purposes.
ChannelHandler that translates HTTP/2 concepts into shared HTTP types for the client side.
ChannelHandler that translates HTTP/2 concepts into shared HTTP types for the server side.
|Last commit: Yesterday
LineBasedFrameDecoder: can be a