#named-pipe #hyper-client #pipe #hyper-http #named #hyper

hyper-named-pipe

Hyper client bindings for Windows Named Pipes

2 releases

0.1.0 Jan 24, 2024
0.1.0-rc1 Jan 20, 2024

#8 in #named-pipe

Download history 24679/week @ 2024-08-03 26867/week @ 2024-08-10 29908/week @ 2024-08-17 32728/week @ 2024-08-24 35479/week @ 2024-08-31 35743/week @ 2024-09-07 32037/week @ 2024-09-14 34711/week @ 2024-09-21 32689/week @ 2024-09-28 30416/week @ 2024-10-05 34673/week @ 2024-10-12 36519/week @ 2024-10-19 33960/week @ 2024-10-26 39855/week @ 2024-11-02 36432/week @ 2024-11-09 34693/week @ 2024-11-16

151,003 downloads per month
Used in 123 crates (2 directly)

Apache-2.0

11KB
125 lines

crates.io license appveyor docs

Hyper-named-pipe: Hyper client bindings for Windows Named Pipes

Exposes a HTTP interface over Tokio's Named Pipes implementation through a Hyper Connection interface.

Install

Add the following to your Cargo.toml file

[dependencies]
hyper-named-pipe = "*"

Usage

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");
};

Tests

It's possible to run the unit test on a unix platform using the cross helper:

cross test --target i686-pc-windows-gnu

Dependencies

~5–13MB
~143K SLoC