ws 0.9.2

Lightweight, event-driven WebSockets for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// WebSocket server used for testing the bench example.
extern crate ws;

use ws::{Builder, Sender, Settings};

fn main() {
    Builder::new()
        .with_settings(Settings {
            max_connections: 10_000,
            ..Settings::default()
        })
        .build(|out: Sender| move |msg| out.send(msg))
        .unwrap()
        .listen("127.0.0.1:3012")
        .unwrap();
}