all listeners depend on async-h1
mod concurrent_listener;
mod failover_listener;
+#[cfg(feature = "h1-server")]
mod parsed_listener;
+#[cfg(feature = "h1-server")]
mod tcp_listener;
mod to_listener;
-#[cfg(unix)]
+#[cfg(feature = "h1-server")]
+mod to_listener_impls;
+#[cfg(all(unix, feature = "h1-server"))]
mod unix_listener;
use crate::Server;
@@ -15,9 +19,11 @@ pub use concurrent_listener::ConcurrentListener;
pub use failover_listener::FailoverListener;
pub use to_listener::ToListener;
+#[cfg(feature = "h1-server")]
pub(crate) use parsed_listener::ParsedListener;
+#[cfg(feature = "h1-server")]
pub(crate) use tcp_listener::TcpListener;
-#[cfg(unix)]
+#[cfg(all(unix, feature = "h1-server"))]
pub(crate) use unix_listener::UnixListener;
/// The Listener trait represents an implementation of http transport
@@ -37,6 +43,7 @@ pub trait Listener<State: 'static>:
/// crate-internal shared logic used by tcp and unix listeners to
/// determine if an io::Error needs a backoff delay. Transient error
/// types do not require a delay.
+#[cfg(feature = "h1-server")]
pub(crate) fn is_transient_error(e: &io::Error) -> bool {
use io::ErrorKind::*;
