Skip to content

Commit dc03ad4

Browse files
authored
feat(client): implement Connection for UnixStream and NamedPipeClient (#177)
1 parent 94afd50 commit dc03ad4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/client/legacy/connect/http.rs

+14
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,20 @@ impl Connection for TcpStream {
522522
}
523523
}
524524

525+
#[cfg(unix)]
526+
impl Connection for tokio::net::UnixStream {
527+
fn connected(&self) -> Connected {
528+
Connected::new()
529+
}
530+
}
531+
532+
#[cfg(windows)]
533+
impl Connection for tokio::net::windows::named_pipe::NamedPipeClient {
534+
fn connected(&self) -> Connected {
535+
Connected::new()
536+
}
537+
}
538+
525539
// Implement `Connection` for generic `TokioIo<T>` so that external crates can
526540
// implement their own `HttpConnector` with `TokioIo<CustomTcpStream>`.
527541
impl<T> Connection for TokioIo<T>

0 commit comments

Comments
 (0)