websocat 4.0.0-alpha3

Command-line client for web sockets, like netcat/curl/socat for ws://.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
    #[cfg(feature = "tokioconsole")]
    {
        console_subscriber::init();
    }
    #[cfg(not(feature = "tokioconsole"))]
    {
        tracing_subscriber::fmt::init();
    }
    let argv = std::env::args_os();
    let stderr = std::io::stderr();
    let time_base = tokio::time::Instant::now();
    let registry = websocat::scenario_executor::types::Registry::default();
    let exit_code = websocat::scenario_executor::exit_code::ExitCodeTracker::new();
    websocat::websocat_main(argv, stderr, time_base, true, registry, exit_code.clone()).await?;
    std::process::exit(exit_code.get())
}