implement h2::server::Stream::send_reset(Reason) and Body::is_empty() (#22)
This commit is contained in:
committed by
Carl Lerche
parent
e8f757457b
commit
f839443ece
@@ -1,12 +1,12 @@
|
||||
use {frame, ConnectionError, StreamId};
|
||||
use Body;
|
||||
use {frame, Body, ConnectionError, StreamId};
|
||||
use proto::{self, Connection, WindowSize};
|
||||
use error::Reason;
|
||||
use error::Reason::*;
|
||||
|
||||
use http::{self, Request, Response};
|
||||
use futures::{self, Future, Sink, Poll, Async, AsyncSink, IntoFuture};
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use bytes::{Bytes, IntoBuf};
|
||||
use bytes::{Bytes, IntoBuf, Buf};
|
||||
|
||||
use std::fmt;
|
||||
|
||||
@@ -191,6 +191,10 @@ impl<B: IntoBuf> Stream<B> {
|
||||
{
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
pub fn send_reset(mut self, reason: Reason) -> Result<(), ConnectionError> {
|
||||
self.inner.send_reset::<Peer>(reason)
|
||||
}
|
||||
}
|
||||
|
||||
impl Stream<Bytes> {
|
||||
|
||||
Reference in New Issue
Block a user