feat(http): add get_ref methods to Encoder and Decoder
This commit is contained in:
11
src/net.rs
11
src/net.rs
@@ -53,11 +53,6 @@ pub enum Blocked {
|
||||
Write,
|
||||
}
|
||||
|
||||
impl Transport for HttpStream {
|
||||
fn take_socket_error(&mut self) -> io::Result<()> {
|
||||
self.0.take_socket_error()
|
||||
}
|
||||
}
|
||||
|
||||
/// Accepts sockets asynchronously.
|
||||
pub trait Accept: Evented {
|
||||
@@ -73,6 +68,12 @@ pub trait Accept: Evented {
|
||||
#[derive(Debug)]
|
||||
pub struct HttpStream(pub TcpStream);
|
||||
|
||||
impl Transport for HttpStream {
|
||||
fn take_socket_error(&mut self) -> io::Result<()> {
|
||||
self.0.take_socket_error()
|
||||
}
|
||||
}
|
||||
|
||||
impl Read for HttpStream {
|
||||
#[inline]
|
||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||
|
||||
Reference in New Issue
Block a user