Crate finchers_tungstenite[][src]

WebSocket support for Finchers based on tungstenite.

Example

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

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

let endpoint = path!(@get / "ws" /)
    .and(finchers_tungstenite::ws())
    .map(|ws: Ws| {
        ws.on_upgrade(|ws: WsTransport| {
            // ...
        })
    });

Re-exports

pub extern crate tungstenite;
pub use tungstenite::error::Error as WsError;
pub use tungstenite::protocol::Message;
pub use tungstenite::protocol::WebSocketConfig;

Structs

HandshakeError

The error type during handling WebSocket handshake.

Ws

A type representing the result of handshake handling.

WsEndpoint

An instance of Endpoint which handles the WebSocket handshake request.

Enums

HandshakeErrorKind

Functions

ws

Create an endpoint which handles the WebSocket handshake request.

Type Definitions

WsTransport