blob: bccfe66fb6b3f4503d46967a67d06acdd2060fd2 (
plain)
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();
}
|