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

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

#210 in HTTP client

Download history 5952/week @ 2024-04-03 5023/week @ 2024-04-10 5196/week @ 2024-04-17 7659/week @ 2024-04-24 7533/week @ 2024-05-01 7890/week @ 2024-05-08 9545/week @ 2024-05-15 10018/week @ 2024-05-22 11024/week @ 2024-05-29 11310/week @ 2024-06-05 13195/week @ 2024-06-12 13457/week @ 2024-06-19 16000/week @ 2024-06-26 22668/week @ 2024-07-03 31613/week @ 2024-07-10 24946/week @ 2024-07-17

98,048 downloads per month
Used in 70 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
~147K SLoC