5 releases

Uses new Rust 2021

0.1.4 Feb 28, 2022
0.1.3 Feb 28, 2022
0.1.2 Dec 9, 2021
0.1.1 Nov 23, 2021
0.1.0 Nov 23, 2021

#15 in #deflate

Download history 64/week @ 2022-01-24 9/week @ 2022-01-31 16/week @ 2022-02-07 25/week @ 2022-02-14 25/week @ 2022-02-21 690/week @ 2022-02-28 659/week @ 2022-03-07 648/week @ 2022-03-14 398/week @ 2022-03-21 57/week @ 2022-03-28 53/week @ 2022-04-04 33/week @ 2022-04-11 28/week @ 2022-04-18 42/week @ 2022-04-25 50/week @ 2022-05-02 25/week @ 2022-05-09

146 downloads per month
Used in 4 crates (3 directly)

Apache-2.0

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:

ratchet_deflate

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

~625KB
~11K SLoC