* Improving performance of base64 encoding by about 10%
* revert alphabet change and use String(customUnsafeUninitializedCapacity:initializingUTF8With:)
* Add performance test for random request key generation
* use reduce
* fix indentation
* add `@inlinable` on custom unsefe inializer for older Swift version
* fix issues mentioned in review
Co-authored-by: Cory Benfield <lukasa@apple.com>
* add randomRequestKey method
* fix some typos
* fix compilation on 5.0
* run generate_linux_tests.rb
* add test with default random number generator
* @inlineable
* base64Encoding @inlineable
Motivation:
In performance tests was shown that the current base 64 encoding function doesn’t perform very well.
https://github.com/apple/swift-nio/issues/1322
Modifications:
This commit replaces the current Base64 implementation with a more performant one (by using UInt8 bytes instead of Unicode.Scalars).
Result:
The API will stay the same. Base64 encoding is just faster.
Motivation:
public/internal modifiers for `extension`s are confusing as a
`func foo` is public if within a `public extension`.
Modifications:
remove all `internal` (redundant) and `public` (dangerous) modifiers for
`extensions`.
Result:
- code easier to read
- code much easier to review in a small diff
Motivation:
NIO2 development starts now.
Modifications:
Made NIO Swift 5-only for everything else see docs/public-api-changes-NIO1-to-NIO2.md
Result:
NIO2 development can start.
Motivation:
Websockets is a major protocol in use on the web today, and is
particularly valuable in applications that use asynchronous I/O
as it allows servers to keep connections open for long periods of
time for fully-duplex communication.
Users of NIO should be able to build websocket clients and servers
without too much difficulty.
Modifications:
Provided a WebsocketFrameEncoder and Decoder that can serialize and
deserialize Websocket frames.
Result:
Easier use of websockets.