6 releases
0.2.0 | Aug 12, 2022 |
---|---|
0.1.4 | Feb 28, 2022 |
0.1.2 | Dec 9, 2021 |
0.1.1 | Nov 23, 2021 |
#20 in #deflate
230 downloads per month
Used in 4 crates
(3 directly)
11KB
123 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
~645KB
~11K SLoC