16 releases (6 stable)
1.2.1 | Sep 30, 2024 |
---|---|
1.0.3 | Jul 25, 2024 |
0.4.2 | May 9, 2024 |
0.4.1 | Aug 8, 2023 |
0.1.1 | Nov 23, 2021 |
#172 in WebSocket
3,154 downloads per month
Used in 13 crates
(3 directly)
15KB
231 lines
Ratchet Extensions
Ratchet is a fast, robust, lightweight and fully asynchronous implementation of RFC6455 (The WebSocket protocol). Complete with an optional implementation of RFC7692 (Compression Extensions For WebSocket).
This crate is used for implementing WebSocket extensions. See the documentation for details.
lib.rs
:
A library for writing extensions for Ratchet.
Implementations:
Usage
Implementing an extension requires two traits to be implemented: [ExtensionProvider] for negotiating the extension during the WebSocket handshake, and [Extension] (along with its bounds) for using the extension during the session.
Splitting an extension
If a WebSocket is to be split into its sending and receiving halves then the extension must
implement the SplittableExtension
trait and if it is to be reunited then it must implement the
ReunitableExtension
. This allows more fine-grained control over the BiLock within the
receiver.
Dependencies
~740KB
~13K SLoC