mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
Optionally support tokio-uds's UnixStream as IoStream (#472)
This commit is contained in:
@ -5,6 +5,8 @@ extern crate bytes;
|
||||
extern crate flate2;
|
||||
extern crate futures;
|
||||
extern crate rand;
|
||||
#[cfg(all(unix, feature = "uds"))]
|
||||
extern crate tokio_uds;
|
||||
|
||||
use std::io::Read;
|
||||
|
||||
@ -198,6 +200,14 @@ fn test_client_gzip_encoding_large_random() {
|
||||
assert_eq!(bytes, Bytes::from(data));
|
||||
}
|
||||
|
||||
|
||||
#[cfg(all(unix, feature = "uds"))]
|
||||
#[test]
|
||||
fn test_compatible_with_unix_socket_stream() {
|
||||
let (stream, _) = tokio_uds::UnixStream::pair().unwrap();
|
||||
let _ = client::Connection::from_stream(stream);
|
||||
}
|
||||
|
||||
#[cfg(feature = "brotli")]
|
||||
#[test]
|
||||
fn test_client_brotli_encoding() {
|
||||
|
Reference in New Issue
Block a user