Merge pull request #19 from nelsonjchen/patch-1

Add use statements to README.md example
pull/20/head
Daniel Abramov 7 years ago committed by GitHub
commit daa7fc1d45
  1. 3
      README.md

@ -3,6 +3,9 @@
Lightweight stream-based WebSocket implementation for [Rust](http://www.rust-lang.org). Lightweight stream-based WebSocket implementation for [Rust](http://www.rust-lang.org).
```rust ```rust
use std::net::TcpListener;
use std::thread::spawn;
use tungstenite::server::accept;
/// A WebSocket echo server /// A WebSocket echo server
let server = TcpListener::bind("127.0.0.1:9001").unwrap(); let server = TcpListener::bind("127.0.0.1:9001").unwrap();

Loading…
Cancel
Save