Skip to content

fussybeaver/hyper-named-pipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rust hyper bindings for windows named pipes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages