Skip to content

Releases: vapor/websocket-kit

2.15.0 - Allow `send(_ binary:)` to accept `some DataProtocol`

20 Mar 17:40
4232d34
Compare
Choose a tag to compare

What's Changed

Allow send(_ binary:) to accept some DataProtocol by @fizker in #146

This allows for passing in Data or ByteBufferView to send(_:), as well as the currently-supported [UInt8] type.

This patch was released by @0xTim

Full Changelog: 2.14.0...2.15.0

Pass a copy of the control frame buffer to ping/pong callbacks

29 May 10:48
53fe063
Compare
Choose a tag to compare
This patch was authored by @tkrajacic and released by @0xTim.

This PR enables access to the data in the control frames handled via onPing/onPong via a new API with the existing onPing and onPong methods being deprecated.

Bump the swift-tools-version to 5.7

25 May 17:56
2ec1450
Compare
Choose a tag to compare
This patch was authored by @Joannis and released by @0xTim.

Set the minimum supported Swift version to 5.7. This is due to the usage of @preconcurrency

Revert Sendable Take 2

25 May 16:41
Compare
Choose a tag to compare

Reverts 2.12.0, in order to maintain compatibility with Swift 5.6 users.

Sendable Take 2

25 May 11:22
a8f3ec8
Compare
Choose a tag to compare
This patch was authored and released by @0xTim.

Adds Sendable annotations where possible. This time we're using @preconcurrency to suppress errors in unsafe code from downstream users

Revert "Add Sendable conformances to WebsocketKit (#131)"

25 May 06:48
0b43ce5
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Due to unforeseen source compatibility breakage, this backs out the changes from release 2.10.0 for now.

Add Sendable conformances to WebsocketKit

24 May 17:40
c2e0aa4
Compare
Choose a tag to compare
This patch was authored and released by @0xTim.

Bump minimum Swift version to 5.6 and add Sendable conformances where appropriate

Work around apple/swift#66099

24 May 09:08
7b6c5bc
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Avoids hitting swiftlang/swift#66099. Holding off on reenabling TSan in CI for now due to remaining warnings about race conditions managing callbacks.

Update for new NIOSSL

15 May 05:18
17c0afb
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Fix for SwiftNIOSSL 2.23.1 breaking the build of the WebSocket tests due to EVP_PKEY no longer being visible.

Shoutout and thanks to @jhoughjr for reporting the problem!

Additional changes:

  • Require Swift 5.6 (matching the rest of Vapor)
  • Update CI (wouldn't be an @gwynne PR without CI tweaks!)
  • Enable Concurrency back-deployment
  • Normalize platform support
  • Some very minor code quality cleanups
  • Added several missing tests (binary frames, manual pings, automatic pings, various connect methods)

Add support for proxying in `WebsocketClient`

11 Apr 14:34
2166cbe
Compare
Choose a tag to compare
This patch was authored by @rnro and released by @0xTim.

Added support for TLS and plain text proxying of Websocket traffic.

  • In the TLS case a CONNECT header is first sent establishing the proxied traffic.

  • In the plain text case the modified URI in the initial upgrade request header indicates to the proxy server that the traffic is to be proxied.

  • Use NIOWebSocketFrameAggregator to handle aggregating frame fragments. This brings with it more protections e.g. against memory exhaustion.

  • Accompanying config has been added to support this change.

This change also includes some performance gains by reducing the allocation and copies necessary to send ByteBuffer and ByteBufferView through WebSocket.send.

  • Sending ByteBuffer or ByteBufferView doesn’t require any allocation or copy of the data. Sending a String now correctly pre allocates the ByteBuffer if multibyte characters are present in the String.

  • Remove custom random websocket mask generation which would only generate bytes between UInt8.min..<UInt8.max, therefore excluding UInt8.max i.e. 255.