Lightweight, event-driven WebSockets for Rust.
Find a file
Jason Housley 339e782536
Merge pull request #345 from PPKunOfficial/PPKunOfficial-patch-1
example: Fix a typo in the comment
2023-08-18 11:15:57 -04:00
examples example: Fix a typo in the comment 2023-08-18 23:00:11 +08:00
src Update context.rs 2022-04-11 19:41:29 -04:00
tests fix formatting 2018-04-06 13:57:07 +02:00
.gitignore fix: Regression where on_close is called more than once, close #146 2017-06-07 20:58:02 -06:00
.rustfmt.toml rustfmt 2018-03-27 16:18:47 -07:00
.travis.yml Fix the build with the ssl feature 2018-08-11 14:18:03 +02:00
Cargo.toml doc: remove ws-rs.org from readme 2022-02-15 12:31:50 -05:00
CHANGELOG.md Release 0.8.0 2019-02-21 13:53:26 +01:00
LICENSE feat: Support permessage-deflate extension 2016-06-15 12:16:30 -06:00
README.md doc: remove ws-rs.org from readme 2022-02-15 12:31:50 -05:00

WS-RS

Lightweight, event-driven WebSockets for Rust.


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

Introduction

Build Status MIT licensed Crate

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

Check out the examples.

Features

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

Contributing

Please report bugs and make feature requests here.