summaryrefslogtreecommitdiffstats
path: root/third_party/rust/mio-named-pipes/README.md
blob: 7290c61ae19bfdb6efb3b4c2b37afccdb5ea6123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# mio-named-pipes

[![Build status](https://ci.appveyor.com/api/projects/status/y0ct01srewnhhesn?svg=true)](https://ci.appveyor.com/project/alexcrichton/mio-named-pipes)

[Documentation](https://docs.rs/mio-named-pipes/0.1/x86_64-pc-windows-msvc/mio_named_pipes/)

A library for integrating Windows [Named Pipes] with [mio].

[Named Pipes]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365590(v=vs.85).aspx
[mio]: https://github.com/carllerche/mio

```toml
# Cargo.toml
[dependencies]
mio-named-pipes = "0.1"
mio = "0.6"
```

## Usage

The primary type, `NamedPipe`, can be constructed with `NamedPipe::new` or
through the `IntoRawHandle` type. All operations on `NamedPipe` are nonblocking
and will return an I/O error if they'd block (with the error indicating so).

Typically you can use a `NamedPipe` in the same way you would a TCP socket on
Windows with mio.

> **Note**: Named pipes on Windows do not have a zero-cost abstraction when
> working with the mio interface (readiness, not completion). As a result, this
> library internally has some buffer management that hasn't been optimized yet.
> It's recommended you benchmark this library for your application, and feel
> free to contact me if anything looks awry.

# License

This project is licensed under either of

 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
   http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT](LICENSE-MIT) or
   http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.