| Crates.io | hyper-named-pipe |
| lib.rs | hyper-named-pipe |
| version | 0.1.0 |
| created_at | 2024-01-20 12:46:27.356284+00 |
| updated_at | 2024-01-24 18:32:54.182321+00 |
| description | Hyper client bindings for Windows Named Pipes |
| homepage | https://github.com/fussybeaver/hyper-named-pipe |
| repository | https://github.com/fussybeaver/hyper-named-pipe |
| max_upload_size | |
| id | 1106452 |
| size | 24,997 |
Exposes a HTTP interface over Tokio's Named Pipes implementation through a Hyper Connection interface.
Add the following to your Cargo.toml file
[dependencies]
hyper-named-pipe = "*"
Ensure host's are hex-encoded when passed into HyperUri as this will bypass validation.
let pipe_name = r"\\.\pipe\named-pipe";
let builder = Client::builder(TokioExecutor::new());
let client: Client<NamedPipeConnector, Full<Bytes>> = builder.build(NamedPipeConnector);
let host = hex::encode(pipe_name);
let uri_str = format!("{}://{}", NAMED_PIPE_SCHEME, host);
let url = uri_str.parse().expect("Invalid URI");
async move {
client.get(url).await.expect("Unable to fetch URL with Hyper client");
};
It's possible to run the unit test on a unix platform using the cross helper:
cross test --target i686-pc-windows-gnu