https://github.com/pirogoeth/unix-named-pipe
Ease creation of named pipes on Unix platform
https://github.com/pirogoeth/unix-named-pipe
fifo named-pipes rust rust-library unix unix-pipes
Last synced: about 2 months ago
JSON representation
Ease creation of named pipes on Unix platform
- Host: GitHub
- URL: https://github.com/pirogoeth/unix-named-pipe
- Owner: pirogoeth
- License: mit
- Created: 2018-10-03T00:51:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T04:57:25.000Z (over 6 years ago)
- Last Synced: 2025-03-18T22:37:11.290Z (about 2 months ago)
- Topics: fifo, named-pipes, rust, rust-library, unix, unix-pipes
- Language: Rust
- Size: 27.3 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unix-named-pipe
[](https://glow.dev.maio.me/sjohnson/unix-named-pipe/commits/master)
[](https://glow.dev.maio.me/sjohnson/unix-named-pipe/commits/master)---
`unix-named-pipe` is a library to ease the creation and usage of named pipes on the Unix platform
## Usage
```rust
extern crate unix_named_pipe;...
let filename = "/var/run/application.pipe";
let mode: u32 = 0o644// Create a new named pipe
unix_named_pipe::create(filename, mode)?;// Open a named pipe for reading
let read_file = unix_named_pipe::open_read(filename)?;// Open a named pipe for writing (appending)
let write_file = unix_named_pipe::open_write(filename)?;
```## Examples
Some examples are provided in the `examples` directory. There are examples for both fixed-size messages and
for variable-sized messages
To start the example client and server, launch the server first to begin reading and then launch the client:```shell
cargo run --example fixsz_server -- /tmp/pipe
cargo run --example fixsz_client -- /tmp/pipe
```## Contributing
Pull requests are welcomed and encouraged. Feel free to ask questions via the issue tracker or email.
Any contributions will be greatly appreciated <3.
## License
Licensed under MIT. See [LICENSE](/LICENSE) for details.