finchers-tungstenite 0.1.0

WebSocket support for Finchers, based on tungstenite.
Documentation

WebSocket support for Finchers based on tungstenite.

Example

#[macro_use]
extern crate finchers;
extern crate finchers_tungstenite;
# extern crate futures;

use finchers::prelude::*;
use finchers_tungstenite::{
  Ws,
  WsTransport,
};

# fn main() {
# drop(|| {
let endpoint = path!(@get / "ws" /)
    .and(finchers_tungstenite::ws())
    .map(|ws: Ws| {
        ws.on_upgrade(|ws: WsTransport| {
            // ...
#           drop(ws);
#           futures::future::ok(())
        })
    });
#
# finchers::launch(endpoint).start("127.0.0.1:4000");
# });
# }