11 Commits

Author SHA1 Message Date
Johannes Weiss
cdd1580a03
LineBasedFrameDecoder: can be a NIOSingleStepByteToMessageDecoder (#217)
Co-authored-by: Johannes Weiss <johannes@jweiss.io>
2024-02-06 16:31:09 +00:00
Cory Benfield
d66ae0557e
Clean up imports and dependencies. (#144)
Motivation:

With NIO 2.32.0 we broke the core NIO module up into modules that split
apart the POSIX layer and the core abstractions. As a result, this
package no longer needs to express a hard dependency on the POSIX layer.

Modifications:

- Rewrote imports of NIO to NIOCore.
- Added NIOEmbedded and NIOPosix imports where necessary in tests.
- Extended soundness script to detect NIO imports.
- Note that the main modules still depend on NIO, which is necessary
    for backwards-compatibility reasons. This dependency is unused.

Result:

No need to use NIOPosix.
2021-09-14 16:30:39 +01:00
Shekhar Rajak
4a71e8ad6e
Get rid of do { ... } catch { ... } for expected errors (#84)
Co-authored-by: Cory Benfield <lukasa@apple.com>
2020-03-18 07:53:09 +00:00
Johannes Weiss
66f9a509ed
use B2MD verifier (#52)
Motivation:

Use B2MDVerifier for the B2MDs in NIOExtras. Already found one bug,
separetely fixed in #51.

Modifications:

Write a basic validation test for all B2MDs.

Result:

Better test coverage.
2019-05-28 11:28:59 +01:00
Johannes Weiss
bddf6c5d74 LineBasedFrameDecoder: tolerate drip fed \r\n (#51)
Motivation:

LineBasedFrameDecoder previously would only correctly decode \r\n as a
line-ending iff \r\n were not split apart.

Modifications:

Handle \r\n arriving apart.

Result:

more correct line splitting
2019-05-10 19:04:33 +01:00
Johannes Weiss
b7a3549b63
update to latest EmbeddedChannel API (#40)
Motivation:

EmbeddedChannel's API has changed a litle bit, we should update.

Modifications:

update

Result:

code will continue to work
2019-03-22 14:00:12 +00:00
Johannes Weiss
1c39f44412
LineBasedFrameDecoder: Don't discard everything after EOF (#39)
Motivation:

LineBasedFrameDecoder discarded everything after EOF and delivered it in
the left-over bytes error. For the real world however that doesn't make
much sense, you'd want all previously received lines and only receive
the partial lines as left-overs.

Modifications:

deliver lines until there are only partial lines left, even in case of
EOF.

Result:

LineBasedFrameDecoder more useful
2019-03-21 14:55:21 +00:00
Johannes Weiss
45ddf6a211
LineBasedFrameDecoder: don't crash when leftovers available (#13)
Motivation:

Currently, we crash if there's any left over bytes available because
LineBasedFrameDecoder modifies cumulationBuffer in a way that is
illegal.

Modifications:

stop modifying cumulationBuffer in an illegal way

Result:

fewer crashes
2019-03-08 15:41:46 +00:00
Johannes Weiss
be3d15ad7b update to latest NIO (#29)
Motivation:

Code broke again (mostly EmbeddedChannel.readInbound/Outbound which is
now throwing)

Modifications:

make code compile again

Result:

happy
2019-03-04 14:03:49 +00:00
Johannes Weiss
7b7fcf09be port to NIO 2 (#24)
Motivation:

NIO 2 is the new hot stuff.

Modifications:

port to NIO 2

Result:

newer, shinier
2019-02-26 13:01:48 +00:00
Liam Flynn
444395adf6 Renames the files for the frame decoder classes to match the class names. (#16)
* 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