#named-pipe #hyper-client #hyper-http #pipe #hyper #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

#175 in HTTP client

Download history 13179/week @ 2024-06-11 13082/week @ 2024-06-18 14541/week @ 2024-06-25 21815/week @ 2024-07-02 31181/week @ 2024-07-09 32577/week @ 2024-07-16 28738/week @ 2024-07-23 29298/week @ 2024-07-30 24181/week @ 2024-08-06 29049/week @ 2024-08-13 28234/week @ 2024-08-20 32286/week @ 2024-08-27 38349/week @ 2024-09-03 35691/week @ 2024-09-10 33005/week @ 2024-09-17 35170/week @ 2024-09-24

146,747 downloads per month
Used in 114 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
~144K SLoC