Commit Graph
7 Commits
Author SHA1 Message Date
Rick Newton-Rogers 67553a7d6d Bump minimum Swift version to 5.7 (#2524)
* Bump minimum Swift version to 5.7

Motivation:

Now that Swift 5.9 is GM we should update the supported versions and
remove 5.6

Modifications:

* Update `Package.swift`
* Remove `#if swift(>=5.7)` guards
* Delete the 5.6 docker compose file and make a 5.10 one
* Update integration test script
* Update docs

Result:

Remove support for Swift 5.6, add 5.10

* fix indentation issues

* 5.9 docker image use release image
2023-10-02 11:38:07 +01:00
Fabian Fett 546eaa261e Add unprocessedBytes property on NIOSingleStepByteToMessageProcessor (#2419) 2023-05-03 17:19:13 +01:00
David NadobaandCory Benfield 4574bdde82 Adopt Sendable in Codec.swift and SingleStepByteToMessageDecoder.swift (#2149)
Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-06-01 08:24:21 -07:00
Max Desiatov 564b29e103 Fix doc comment formatting in SingleStepByteToMessageDecoder.swift (#2076) 2022-04-12 07:17:13 -07:00
Fabian Fett 43901f9f9f Only reclaim once at the end of the loop (#1958)
Same issue as fixed #1733 for ByteToMessageHandler.

### Motivation:

`NIOSingleStepByteToMessageProcessor` called out to the decoder's shouldReclaimBytes method after every parsing attempt, even if the decoder returned a value (which means continue in the `decodeLoop`).

That's quite pointless because we won't add any bytes into the buffer before we're trying the decoder again. Further it is a huge performance penalty for a use-cases in which we only consume small frames from the buffer. (Like reading data rows in a database client)

### Modifications:

- Only ask the decoder if we should reclaim bytes if the decoder actually is not able to process more frames from the input buffer.
2021-09-17 12:03:20 +02:00
Fabian Fett d8e1b1f96f [NIOSingleStepByteToMessageProcessor] Inline process methods (#1959)
* Inline NIOSingleStepByteToMessageProcessor

* Code review
2021-09-17 10:37:34 +01:00
Cory Benfield 8d3d0e901c Move the Codecs to NIOCore (#1927)
Motivation:

Our basic Channel Handlers don't need to be in NIO anymore: they aren't
realistically tied to that code. So we can move them to NIOCore.

Modifications:

- Move Codecs to NIOCore
- Move SingleStepByteToMessageDecoder to NIOCore.

Result:

Even more stuff in NIOCore
2021-08-05 08:59:01 +01:00