Motivation:
Frequently, people want to terminate their pipeline with a handler that
takes in requests & a promise and on receipt of the response just
fulfill that promise.
Modifications:
- add `RequestResponseHandler`
- remove outdated of contents from README.md
Result:
more useful handlers
Motivation:
Users may want to log all of inbound and/or outbound events
Modifications:
Add DebugInboundEventsHandler and DebugOutboundEventsHandler
Result:
Users can plug additional handlers into their pipeline for default printing of events or getting a hook with relevant information for their own logging mechanism.
Motivation:
To improve the visibility of recently added files.
Modifications:
Adds 3 files to the file list in README.md.
Includes additional contributor.
Result:
Easier to see the full project contents as the readme is more accurate.
* Adds a LengthFieldPrepender class to prepend the length onto a message.
This class is a type of byte to message encoder.
Motivation:
To encode a prepended length field on data so that messages of arbitrary size can be sent.
Can work as a pair with the ‘LengthFieldBasedFrameDecoder’.
Modifications:
Added ‘LengthFieldPrepender’
Added unit tests for ‘LengthFieldPrepender’ in ‘LengthFieldPrependerTest’
Updated the linux text files by running the script.
Result:
The length can now be easily prepended to any message.
Motivation:
ByteToMessageDecoder is extremely brittle, for example a reentrant call
into decodeLast will present the user with bytes that were previously
seen...
Modification:
Discard bytes in decodeLast
Result:
LengthFieldBasedFrameDecoder will work if close called from channelRead.
* Adds a basic LengthFieldBasedFrameDecoder
Motivation:
Adding a popular type of decoder that is useful in real-world situations, particularly when dealing with protocol buffers.
Modifications:
Added the decoder class, tests and linux test files.
Result:
The project now includes a basic length field based decoder which can be built upon.
Further header specification may be required but this version suits basic usage.
* Renames the class files for the frame decoders to match the class names.
Motivation:
Neatening of the project by ensuring file names match the contained class names.
Modifications:
5 file renames, 4 of which are test files.
Result:
Ruby hooks script ran with no changes.
No breaking changes.
The project is a little neater.
* Adds a line-based frame decoder that can split received buffers on line endings.
Motivation:
As per https://github.com/apple/swift-nio/issues/473
Modifications:
Added a new decoder (LineBasedFrameDecoder) that splits incoming buffers on line end characters.
Result:
Received buffers will be split on line end character(s) ('\n' or '\r\n'), with these characters
stripped in the resulting buffers.
Motivation:
Probably a hangover of using NIO's version as template.
Modifications:
Updated the repository URL where to open PR in CONTRIBUTING.md
Result:
"Please open a pull request at https://github.com/apple/swift-nio-extras"
Provide a decoder for frames with a fixed length.
Motivation:
This was motivated by the issue https://github.com/apple/swift-nio/issues/474 as a good first issue.
Modifications:
Implemented a FixedLengthFrameDecoder as well as tests.
Result:
Users can decode fixed length frames.
Motivation:
in SwiftPM it's either of these three formats
- from: "0.1.0"
- .exact("0.1.0")
- .upToNextMajor(from: "0.1.0")
and I messed up the last one (forgot the `from:`)
Modifications:
fixed Package.swift
Result:
recommended syntax actually works
Motivation:
As swift-nio-extras is new, we can require Swift 4.1 which will allow us
to CI less stuff and also won't compatibility stuff for 4.0 that nobody
uses anymore.
Modifications:
require Swift 4.1
Result:
shinier
Motivation:
It's better for users to depend on `.upToNextMinor` instead of `.exact`
versions and I previously forgot to mention the quiescing helper in
the readme.
Modifications:
- mention quiescing helper in readme
- recommend to depend on this package with `.upToNextMinor`
Result:
better readme
Motivation:
We need the docker setup for CI.
Modifications:
Added docker setup. Started with swift-nio's setup and then removed
everything that we don't need (test, http, echo, integration-tests).
Result:
We can move forward doing CI.
Motivation:
In a few cases quiescing a server application is useful but it's harder
than necessary with core-NIO. Therefore this adds a helper & a
demonstration.
Modifications:
- add `QuiescingHelper` which helps users to quiesce a channel by
collecting all accepted channels and when needed sends them the
quiescing user event. When all collected channels have closed the
user will be notified and can just shut down the ELG.
- added a demo implementation with a simple HTTP server that quiesces
when receiving a signal
Result:
Make it quite easy to quiesce a server and show users how to do it.