Releases: vapor/websocket-kit
Release Candidate 1
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
Add channelInactive callback to mark WebSocket as closed.
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
Fixes Atomic deprecation (fixes #53)
wss:// fix
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
- Adds
onPingandonPongcallbacks toWebSocket(#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")
}WebSocketKit 2.0.0 Beta 2
WebSocketKit 2.0.0 Beta 1
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
Fixed:
- Fixed a reference cycle in
WebSocket.
WebSocket 1.1.1
Fixed:
WebSocketnow buffers incoming messages before callbacks are set. (#31)