Crates.io | tipsy |
lib.rs | tipsy |
version | |
source | src |
created_at | 2024-05-22 04:26:22.108877 |
updated_at | 2025-01-18 20:17:01.739437 |
description | Cross-platform IPC for Tokio |
homepage | https://github.com/aschey/tipsy |
repository | https://github.com/aschey/tipsy |
max_upload_size | |
id | 1247467 |
Cargo.toml error: | TOML parse error at line 24, column 1 | 24 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This is a fork of parity-tokio-ipc.
tipsy is a library for cross-platform async IPC using Tokio.
It utilizes unix sockets on UNIX (via tokio::net::UnixStream
)
and named pipes on windows (via tokio::net::windows::named_pipe
).
use tipsy::{Endpoint, OnConflict, ServerId};
use futures::stream::StreamExt;
use std::error::Error;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
Endpoint::new(ServerId::new("my-server"), OnConflict::Overwrite)?
.incoming()?
.for_each(|conn| async {
match conn {
Ok(stream) => println!("Got connection!"),
Err(e) => eprintln!("Error when receiving connection: {:?}", e),
}
});
Ok(())
}
use tipsy::{Endpoint, ServerId};
use tokio::io::AsyncWriteExt;
use std::error::Error;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let mut client = Endpoint::connect(ServerId::new("my-server")).await?;
client.write_all(b"ping").await?;
Ok(())
}
See examples.
The MSRV is currently 1.75.0
.