1
0
mirror of https://github.com/apple/swift-nio-extras.git synced 2025-06-02 11:06:17 +08:00

23 Commits

Author SHA1 Message Date
Johannes Weiss
7b7fcf09be port to NIO 2 ()
Motivation:

NIO 2 is the new hot stuff.

Modifications:

port to NIO 2

Result:

newer, shinier
2019-02-26 13:01:48 +00:00
tomer doron
24c1e12ad2 fix docker setup for swift 5 ()
motivation: build on swift 5

changes:
* fix test task defition to use correct image
* remove redundant jazzy setup
2019-02-26 11:27:35 +00:00
Johannes Weiss
f7cc6c3db5
Swift 5 docker-compose stuff () 2019-02-24 20:22:04 +00:00
Johannes Weiss
0dbd54199d
add RequestResponseHandler ()
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
0.1.3
2019-01-29 15:30:24 +00:00
JovanMilenkovic
f137a8c931 Add channel handlers to debug inbound and outbound events ()
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.
2019-01-21 21:10:52 +00:00
Liam Flynn
5a4a0976b3 Adds missing files to the contents list in the readme. ()
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.
2019-01-14 14:18:18 +00:00
Liam Flynn
34a17feb83 Adds a LengthFieldPrepender class to prepend the length onto a message. ()
* 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.
2019-01-02 18:09:05 +00:00
Johannes Weiss
292b0cf25c LengthFieldBasedFrameDecoder: work around brittle B2MD ()
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.
2018-12-14 15:35:25 +00:00
Liam Flynn
a9aafde504 Adds a basic length field based frame decoder class. ()
* 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.
2018-11-27 14:30:20 +00:00
Liam Flynn
444395adf6 Renames the files for the frame decoder classes to match the class names. ()
* 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.
2018-10-31 10:05:50 +00:00
Johannes Weiss
28154e042e empty commit
Motivation:

for administrative reasons

Modifications:

none

Result:

same as 0.1.1
0.1.2
2018-09-12 12:43:11 +01:00
Ludovic Dewailly
ad4edc8cb5 Adds a line-based frame decoder that can split received buffers on line endings. ()
* 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.
0.1.1
2018-08-06 16:43:39 +01:00
Ludovic Dewailly
abaecbd4e7 Minor change to correct which git repository developers should open pull request at. ()
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"
2018-08-06 10:03:10 +01:00
Franz Busch
10e173cbed FixedLengthFrameDecoder ()
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.
2018-07-17 16:12:26 +01:00
Franz Busch
fb343c365e github templates () 2018-07-14 12:06:55 +01:00
Johannes Weiß
f5512693e3 fix readme dependency ()
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
2018-05-23 19:28:32 +01:00
Johannes Weiß
51c2dfb37b require Swift 4.1 ()
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
0.1.0
2018-05-23 16:32:57 +01:00
Johannes Weiß
bdd3e06759 update README: upToNextMinor & current contents ()
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
2018-05-23 14:49:35 +01:00
Johannes Weiß
2516d61aee
add docker setup ()
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.
2018-05-22 10:31:13 +01:00
Johannes Weiß
4b14b7f2b1 quiescing helper & demo ()
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.
2018-05-17 20:27:15 +02:00
Johannes Weiß
609d45fe14 add README () 2018-05-16 11:44:17 +01:00
Johannes Weiss
9883b25cf0 add git commit template
Motivation:

We want commits to have messages like this commit

Modifications:

added commit template

Result:

More uniform commits
2018-05-15 17:09:13 +01:00
Johannes Weiss
0874b531ce initial commit 2018-05-15 15:36:56 +01:00