Skip to content

Releases: vapor/websocket-kit

Release Candidate 1

01 Mar 17:21
aac4624

Choose a tag to compare

Release Candidate 1 Pre-release
Pre-release

Updates to Swift 5.2 and macOS 10.15. Adds additional CI + README updates.

Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.

Add errorCaught handler to close the WebSocket

26 Feb 21:09
670e757

Choose a tag to compare

Now when an error is thrown by NIO we receive it and close the WebSocket connection. The error code is available on WebSocket.closeCode by the time the WebSocket.onClose future resolves (#61, fixes #58).

Add channelInactive callback to mark WebSocket as closed.

26 Feb 20:40
e35af05

Choose a tag to compare

The channelInactive callback is triggered when a WebSocket closes without sending a close code. Previously, the WebSocket.onClose future was still fulfilled but WebSocket.isClosed would be false and WebSocket.closeCode would be nil. This would later cause an assertion when WebSocket deinitialized. Now the onClose future is still fulfilled, but while also setting isClosed and closeCode (#60, fixes vapor/vapor#2107).

Fix Atomic Deprecation

22 Jan 17:50
766b4b0

Choose a tag to compare

Pre-release

Fixes Atomic deprecation (fixes #53)

wss:// fix

20 Jan 17:24

Choose a tag to compare

wss:// fix Pre-release
Pre-release

Fixes a small issue with regards to forwarding bytes on a wss websocket. Also ups NIO version to 2.11.1 because of apple/swift-nio#1280.

Add ping/pong callbacks to WebSocket

16 Dec 22:09

Choose a tag to compare

Pre-release
  • Adds onPing and onPong callbacks to WebSocket (#45)

Although WebSocketKit handles ping / pong automatically according to spec, it can be useful to know when these events happen.

ws.onPong { ws in
    print("pong received")
}

ws.onPing { ws in
    print("ping received")
}
  • Adds WebSocket.closeCode containing WebSocketErrorCode that is set when the WebSocket closes (#45)

  • HTTPHeaders are now passed through WebSocket.connect calls (#45)

WebSocketKit 2.0.0 Beta 2

09 Dec 15:34
3c3bf59

Choose a tag to compare

Pre-release
  • Fixed wss:// default port. (#47, #48)

  • Enabled test discovery on Linux (#50)

WebSocketKit 2.0.0 Beta 1

24 Oct 19:09
66c0ea5

Choose a tag to compare

Pre-release

This package has been renamed to WebSocketKit. It now focuses on supplying a WebSocket client modeled after async-http-client. WebSocket server is still supported, but it is expected that you will bring your own NIO ServerBootstrap.

For usage examples, check out the tests folder:
https://github.com/vapor/websocket-kit/blob/master/Tests/WebSocketKitTests/NIOWebSocketClientTests.swift

WebSocket 1.1.2

26 Mar 17:04
d85e5b6

Choose a tag to compare

Fixed:

  • Fixed a reference cycle in WebSocket.

WebSocket 1.1.1

17 Jan 18:16
21eb477

Choose a tag to compare

Fixed:

  • WebSocket now buffers incoming messages before callbacks are set. (#31)