1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

upgrade to actix-net release

This commit is contained in:
Nikolay Kim
2019-12-11 19:20:20 +06:00
parent ef3a33b9d6
commit 131c897099
16 changed files with 71 additions and 75 deletions

View File

@ -2,7 +2,7 @@ use actix_codec::{AsyncRead, AsyncWrite};
use actix_http::{body, http::StatusCode, ws, Error, HttpService, Response};
use actix_http_test::TestServer;
use actix_service::{pipeline_factory, IntoServiceFactory, ServiceFactory};
use actix_utils::framed::FramedTransport;
use actix_utils::framed::Dispatcher;
use bytes::BytesMut;
use futures::{future, SinkExt, StreamExt};
@ -18,7 +18,7 @@ async fn ws_service<T: AsyncRead + AsyncWrite>(
.send((res, body::BodySize::None).into())
.await
.unwrap();
FramedTransport::new(framed.into_framed(ws::Codec::new()), service)
Dispatcher::new(framed.into_framed(ws::Codec::new()), service)
.await
.unwrap();