mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 18:09:22 +02:00
no need for StreamHandler
This commit is contained in:
@ -151,9 +151,6 @@ impl<H: 'static> Actor for Worker<H> where H: HttpHandler + 'static {
|
||||
}
|
||||
}
|
||||
|
||||
impl<H> StreamHandler<Conn<net::TcpStream>> for Worker<H>
|
||||
where H: HttpHandler + 'static {}
|
||||
|
||||
impl<H> Handler<Conn<net::TcpStream>> for Worker<H>
|
||||
where H: HttpHandler + 'static,
|
||||
{
|
||||
|
@ -23,8 +23,6 @@
|
||||
//! }
|
||||
//!
|
||||
//! // Define Handler for ws::Message message
|
||||
//! # impl StreamHandler<ws::Message> for Ws {}
|
||||
//! #
|
||||
//! impl Handler<ws::Message> for Ws {
|
||||
//! type Result = ();
|
||||
//!
|
||||
@ -49,7 +47,7 @@ use http::{Method, StatusCode, header};
|
||||
use bytes::BytesMut;
|
||||
use futures::{Async, Poll, Stream};
|
||||
|
||||
use actix::{Actor, AsyncContext, ResponseType, StreamHandler};
|
||||
use actix::{Actor, AsyncContext, ResponseType, Handler};
|
||||
|
||||
use payload::ReadAny;
|
||||
use error::{Error, WsHandshakeError};
|
||||
@ -86,7 +84,7 @@ impl ResponseType for Message {
|
||||
|
||||
/// Do websocket handshake and start actor
|
||||
pub fn start<A, S>(mut req: HttpRequest<S>, actor: A) -> Result<HttpResponse, Error>
|
||||
where A: Actor<Context=HttpContext<A, S>> + StreamHandler<Message>,
|
||||
where A: Actor<Context=HttpContext<A, S>> + Handler<Message>,
|
||||
S: 'static
|
||||
{
|
||||
let mut resp = handshake(&req)?;
|
||||
|
Reference in New Issue
Block a user