1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 08:38:16 +02:00

sync with latest actix

This commit is contained in:
Nikolay Kim
2018-02-12 12:17:30 -08:00
parent 30bdf9cb5e
commit 8c1b5fa945
16 changed files with 65 additions and 103 deletions

View File

@@ -47,7 +47,7 @@ use bytes::BytesMut;
use http::{Method, StatusCode, header};
use futures::{Async, Poll, Stream};
use actix::{Actor, AsyncContext, ResponseType, Handler};
use actix::{Actor, AsyncContext, Handler};
use body::Binary;
use payload::ReadAny;
@@ -74,7 +74,7 @@ const SEC_WEBSOCKET_VERSION: &str = "SEC-WEBSOCKET-VERSION";
/// `WebSocket` Message
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Message)]
pub enum Message {
Text(String),
Binary(Binary),
@@ -85,11 +85,6 @@ pub enum Message {
Error
}
impl ResponseType for Message {
type Item = ();
type Error = ();
}
/// Do websocket handshake and start actor
pub fn start<A, S>(mut req: HttpRequest<S>, actor: A) -> Result<HttpResponse, Error>
where A: Actor<Context=WebsocketContext<A, S>> + Handler<Message>,