| Crates.io | streamfly |
| lib.rs | streamfly |
| version | 0.1.0 |
| created_at | 2023-09-16 07:30:50.53263+00 |
| updated_at | 2023-09-16 07:30:50.53263+00 |
| description | A stream-oriented Pub/Sub framework |
| homepage | |
| repository | https://github.com/netxp1318/streamfly |
| max_upload_size | |
| id | 974207 |
| size | 67,135 |
StreamFly aims to be a stream-oriented Pub/Sub framework.
let mut client = new_client(
"127.0.0.1:1318".parse()?,
"localhost",
Path::new("./certs/cert.pem"),
)
.await?;
let rx = client.subscribe(CHANNEL).await?;
loop {
let (_, mut reader) = rx.recv().await?;
tokio::spawn(async move { tokio::io::copy(&mut reader, &mut tokio::io::stdout()).await });
}
let (stream_id, mut writer) = client.open_stream(CHANNEL).await?;
writer.write_all(b"Hello, Streamfly!").await?;
RUSTFLAGS="--cfg s2n_quic_unstable" cargo build
RUSTFLAGS="--cfg s2n_quic_unstable" cargo build --examples
RUST_LOG=debug ./target/debug/streamfly serve
RUST_LOG=debug ./target/debug/examples/sub
RUST_LOG=debug ./target/debug/examples/pub
RUST_LOG=debug ./target/debug/examples/sub