mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 18:02:58 +01:00
better naming
This commit is contained in:
parent
cedba24a36
commit
132be0baa1
@ -47,7 +47,7 @@ where
|
||||
type Future = FromErrFuture<A, E, Request>;
|
||||
|
||||
fn poll_ready(&mut self) -> Poll<(), E> {
|
||||
Ok(self.service.poll_ready().map_err(E::from)?)
|
||||
self.service.poll_ready().map_err(E::from)
|
||||
}
|
||||
|
||||
fn call(&mut self, req: Request) -> Self::Future {
|
||||
|
@ -210,7 +210,7 @@ where
|
||||
<U as Encoder>::Item: 'static,
|
||||
<U as Encoder>::Error: std::fmt::Debug,
|
||||
{
|
||||
fn poll_service(&mut self) -> bool {
|
||||
fn poll_read(&mut self) -> bool {
|
||||
loop {
|
||||
match self.service.poll_ready() {
|
||||
Ok(Async::Ready(_)) => loop {
|
||||
@ -246,8 +246,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// write to sink
|
||||
fn poll_response(&mut self) -> bool {
|
||||
/// write to framed object
|
||||
fn poll_write(&mut self) -> bool {
|
||||
let inner = self.inner.get_mut();
|
||||
loop {
|
||||
while !self.framed.is_write_buf_full() {
|
||||
@ -354,7 +354,7 @@ where
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
match mem::replace(&mut self.state, TransportState::Processing) {
|
||||
TransportState::Processing => {
|
||||
if self.poll_service() || self.poll_response() {
|
||||
if self.poll_read() || self.poll_write() {
|
||||
self.poll()
|
||||
} else {
|
||||
Ok(Async::NotReady)
|
||||
@ -362,7 +362,7 @@ where
|
||||
}
|
||||
TransportState::Error(err) => {
|
||||
if self.framed.is_write_buf_empty()
|
||||
|| (self.poll_response() || self.framed.is_write_buf_empty())
|
||||
|| (self.poll_write() || self.framed.is_write_buf_empty())
|
||||
{
|
||||
Err(err)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user