9 unstable releases (3 breaking)

0.4.1 Aug 8, 2023
0.4.0 Jun 27, 2023
0.3.0 Apr 5, 2023
0.2.0 Aug 12, 2022
0.1.1 Nov 23, 2021

#156 in WebSocket

Download history 3/week @ 2024-01-05 4/week @ 2024-01-12 4/week @ 2024-02-09 18/week @ 2024-02-16 66/week @ 2024-02-23 34/week @ 2024-03-01 35/week @ 2024-03-08 25/week @ 2024-03-15 35/week @ 2024-03-22 75/week @ 2024-03-29 31/week @ 2024-04-05 35/week @ 2024-04-12 29/week @ 2024-04-19

175 downloads per month
Used in 6 crates (3 directly)

Apache-2.0

12KB
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

~665KB
~11K SLoC