#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

#203 in HTTP client

Download history 16/week @ 2024-01-20 2/week @ 2024-01-27 70/week @ 2024-02-03 125/week @ 2024-02-10 137/week @ 2024-02-17 220/week @ 2024-02-24 1455/week @ 2024-03-02 2790/week @ 2024-03-09 4692/week @ 2024-03-16 3934/week @ 2024-03-23 4521/week @ 2024-03-30 5999/week @ 2024-04-06 4834/week @ 2024-04-13 4765/week @ 2024-04-20

21,027 downloads per month
Used in 24 crates (via bollard)

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–17MB
~161K SLoC