Releases: vapor/websocket-kit
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
onPing
andonPong
callbacks 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:
WebSocket
now buffers incoming messages before callbacks are set. (#31)
WebSocket 1.1.0
New:
- New
send(raw:opcode:fin:promise:)
method onWebSocket
. (#28)
ws.send(raw: "Hello, ", opcode: .text, fin: false)
ws.send(raw: "world", opcode: .continuation, fin: false)
ws.send(raw: "!", opcode: .continuation)
- WebSocket server now supports parsing continuation frames from the client. (#27)
Fixed:
- WebSocket client now properly masks pong frame. (#26)
Websocket 1.0.2
Fixes masking frame issue in client mode. Thanks @pvels