Struct tk_http::server::buffered::WebsocketFactory
[−]
[src]
pub struct WebsocketFactory<H, I> { /* fields omitted */ }A helper to create a simple websocket (and HTTP) service
It's internally created by BufferedDispatcher::new_with_websockets()
Trait Implementations
impl<H, I, T, U, S: Io> NewService<S> for WebsocketFactory<H, I> where H: Fn(Request, Encoder<S>) -> T,
I: Fn(WriteFramed<S, WebsocketCodec>, ReadFramed<S, WebsocketCodec>) -> U,
T: Future<Item=EncoderDone<S>, Error=Error>,
U: Future<Item=(), Error=()> + 'static[src]
I: Fn(WriteFramed<S, WebsocketCodec>, ReadFramed<S, WebsocketCodec>) -> U,
T: Future<Item=EncoderDone<S>, Error=Error>,
U: Future<Item=(), Error=()> + 'static
type Future = T
Future returned by the service (an actual function serving request)
type Instance = WebsocketService<H, I, T, U>
Instance of the service, created for each request
fn new(&self) -> Self::Instance
Constructor of the instance of the service, created for each request