diff --git a/src/framed.rs b/src/framed.rs index 93e462bc..ddda25f8 100644 --- a/src/framed.rs +++ b/src/framed.rs @@ -60,7 +60,7 @@ where ::Error: fmt::Debug + 'static, { type Request = Framed; - type Response = FramedDispatcher; + type Response = FramedTransport; type Error = S::InitError; type InitError = S::InitError; type Service = FramedService; @@ -102,7 +102,7 @@ where ::Error: fmt::Debug + 'static, { type Request = Framed; - type Response = FramedDispatcher; + type Response = FramedTransport; type Error = S::InitError; type Future = FramedServiceResponseFuture; @@ -143,13 +143,13 @@ where ::Item: fmt::Debug + 'static, ::Error: fmt::Debug + 'static, { - type Item = FramedDispatcher; + type Item = FramedTransport; type Error = S::InitError; fn poll(&mut self) -> Poll { match self.fut.poll()? { Async::NotReady => Ok(Async::NotReady), - Async::Ready(service) => Ok(Async::Ready(FramedDispatcher::new( + Async::Ready(service) => Ok(Async::Ready(FramedTransport::new( self.framed.take().unwrap(), service, ))), @@ -157,9 +157,9 @@ where } } -/// FramedDispatcher - is a future that reads frames from Framed object +/// FramedTransport - is a future that reads frames from Framed object /// and pass then to the service. -pub struct FramedDispatcher +pub struct FramedTransport where S: Service, T: AsyncRead + AsyncWrite, @@ -174,7 +174,7 @@ where flushed: bool, } -impl FramedDispatcher +impl FramedTransport where T: AsyncRead + AsyncWrite, U: Decoder + Encoder, @@ -186,7 +186,7 @@ where { pub fn new>(framed: Framed, service: F) -> Self { let (write_tx, write_rx) = mpsc::channel(16); - FramedDispatcher { + FramedTransport { framed, item: None, service: service.into_service(), @@ -198,7 +198,7 @@ where } } -impl Future for FramedDispatcher +impl Future for FramedTransport where T: AsyncRead + AsyncWrite, U: Decoder + Encoder,