StreamFly

StreamFly aims to be a stream-oriented Pub/Sub framework.

Quickstart

rust let mut client = new_client( "127.0.0.1:1318".parse()?, "localhost", Path::new("./certs/cert.pem"), ) .await?;

```rust 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 });

} ```

```rust let (streamid, mut writer) = client.openstream(CHANNEL).await?;

writer.write_all(b"Hello, Streamfly!").await?; ```

Build

sh RUSTFLAGS="--cfg s2n_quic_unstable" cargo build

sh RUSTFLAGS="--cfg s2n_quic_unstable" cargo build --examples

Run the demo

sh RUST_LOG=debug ./target/debug/streamfly serve

sh RUST_LOG=debug ./target/debug/examples/sub

sh RUST_LOG=debug ./target/debug/examples/pub

sh RUST_LOG=debug ./target/debug/examples/sub