rustdesk/libs/parity-tokio-ipc
2021-03-29 15:59:14 +08:00
..
examples source code 2021-03-29 15:59:14 +08:00
src source code 2021-03-29 15:59:14 +08:00
.gitignore source code 2021-03-29 15:59:14 +08:00
.travis.yml source code 2021-03-29 15:59:14 +08:00
appveyor.yml source code 2021-03-29 15:59:14 +08:00
Cargo.toml source code 2021-03-29 15:59:14 +08:00
LICENSE-APACHE source code 2021-03-29 15:59:14 +08:00
LICENSE-MIT source code 2021-03-29 15:59:14 +08:00
README.md source code 2021-03-29 15:59:14 +08:00

parity-tokio-ipc

Build Status

Documentation

This crate abstracts interprocess transport for UNIX/Windows. On UNIX it utilizes unix sockets (tokio_uds crate) and named pipe on windows (experimental tokio-named-pipes crate).

Endpoint is transport-agnostic interface for incoming connections:

  let endpoint = Endpoint::new(endpoint_addr, handle).unwrap();
  endpoint.incoming().for_each(|_| println!("Connection received!"));

And IpcStream is transport-agnostic io:

  let endpoint = Endpoint::new(endpoint_addr, handle).unwrap();
  endpoint.incoming().for_each(|(ipc_stream: IpcStream, _)| io::write_all(ipc_stream, b"Hello!"));

License

parity-tokio-ipc is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, and LICENSE-MIT for details.