#event-driven #mio #client-connection #io #web

tetsy-ws

Tetsy Lightweight, event-driven WebSockets for Rust

Show the crate…

1 unstable release

Uses old Rust 2015

0.10.0 Mar 13, 2021
0.0.0 Mar 13, 2021

#50 in #client-connection

Download history 31/week @ 2024-04-14 41/week @ 2024-04-21 30/week @ 2024-04-28 29/week @ 2024-05-05 31/week @ 2024-05-12 31/week @ 2024-05-19 38/week @ 2024-05-26 35/week @ 2024-06-02 22/week @ 2024-06-09 32/week @ 2024-06-16 33/week @ 2024-06-23 8/week @ 2024-06-30 10/week @ 2024-07-07 33/week @ 2024-07-14 30/week @ 2024-07-21 20/week @ 2024-07-28

93 downloads per month
Used in 26 crates (via tetsy-jsonrpc-ws-server)

MIT license

240KB
5.5K SLoC

tetsy-ws

Lightweight, event-driven WebSockets for Rust.


/// A WebSocket echo server
listen("127.0.0.1:3012", |out| {
    move |msg| {
        out.send(msg)
    }
})

This fork

Note this is (hopefuly) a temporary fork of the original crate until https://github.com/housleyjk/ws-rs/pull/328 gets merged.

Introduction

Build Status MIT licensed

Homepage

API Documentation

This library provides an implementation of WebSockets, RFC6455 using MIO. It allows for handling multiple connections on a single thread, and even spawning new client connections on the same thread. This makes for very fast and resource efficient WebSockets. The API design abstracts away the menial parts of the WebSocket protocol and allows you to focus on application code without worrying about protocol conformance. However, it is also possible to get low-level access to individual WebSocket frames if you need to write extensions or want to optimize around the WebSocket protocol.

Getting Started

For detailed installation and usage instructions, check out the guide.

Features

WS-RS provides a complete implementation of the WebSocket specification. There is also support for ssl and permessage-deflate.

Testing

WS-RS is thoroughly tested and passes the Autobahn Test Suite for WebSockets, including the tests for permessage-deflate. Visit ws-rs.org to view the results of the latest test run.

Contributing

Please report bugs and make feature requests here.

Dependencies

~4–14MB
~195K SLoC