use ibrahim_tcp::{Packet, Server};
use tokio::time::{sleep, Duration};
#[tokio::main]
async fn main() -> std::io::Result<()> {
let server = Server::new("0.0.0.0:4000").await?;
println!("[Ibrahim TCP] Server started on 0.0.0.0:4000");
let mut tick = 0u64;
loop {
let pkt = Packet::new(tick, format!("tick={}", tick), true);
server.broadcast(&pkt).await;
tick += 1;
sleep(Duration::from_secs(1)).await;
}
}