Files
bft-crdt-experiment/side-node/src/main.rs
2024-05-29 13:17:16 +01:00

19 lines
439 B
Rust

use cli::parse_args;
use websockets::{WebSocket, WebSocketError};
pub(crate) mod cli;
#[tokio::main]
async fn main() -> Result<(), WebSocketError> {
parse_args();
let mut ws = WebSocket::connect("ws://localhost:8080/").await?;
ws.send_text("foo".to_string()).await?;
// ws.receive().await?;
// ws.close(None).await?;
loop {
let msg = ws.receive().await?;
println!("Received: {:?}", msg);
}
}