Commit 356d4a04 authored by Steven Fackler's avatar Steven Fackler
Browse files

Remove AsRaw{Fd, Socket} impls

An SslStream can't really act as a raw socket since you'd skip the whole
TLS layer
parent f1846bce
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -17,10 +17,6 @@ use libc::{c_uchar, c_uint};
#[cfg(any(feature = "npn", feature = "alpn"))]
use std::slice;
use std::marker::PhantomData;
#[cfg(unix)]
use std::os::unix::io::{AsRawFd, RawFd};
#[cfg(windows)]
use std::os::windows::io::{AsRawSocket, RawSocket};

use ffi;
use ffi_extras;
@@ -1052,20 +1048,6 @@ impl<S> fmt::Debug for SslStream<S> where S: fmt::Debug
    }
}

#[cfg(unix)]
impl<S: AsRawFd> AsRawFd for SslStream<S> {
    fn as_raw_fd(&self) -> RawFd {
        self.get_ref().as_raw_fd()
    }
}

#[cfg(windows)]
impl<S: AsRawSocket> AsRawSocket for SslStream<S> {
    fn as_raw_socket(&self) -> RawSocket {
        self.get_ref().as_raw_socket()
    }
}

impl<S: Read + Write> SslStream<S> {
    fn new_base(ssl: Ssl, stream: S) -> Self {
        unsafe {