Calling & Config

This commit is contained in:
Alex Emmet 2025-11-10 22:13:05 +00:00
commit e4bea23dc2
8 changed files with 47 additions and 31 deletions

View file

@ -19,19 +19,22 @@ use crate::{
calls::call_connection::CallConnection,
omega::omega_connection::OmegaConnection,
rho::{client_connection::ClientConnection, iota_connection::IotaConnection},
util::config_util::CONFIG,
util::print::{PrintType, line, line_err, print_start_message},
};
#[tokio::main]
#[tokio::main]
async fn main() {
print_start_message();
tokio::spawn(async move {
OmegaConnection::new().connect().await;
});
let listener = TcpListener::bind("0.0.0.0:959").await.unwrap();
let address = format!("{}:{}", &CONFIG.read().await.ip, &CONFIG.read().await.port);
let listener = TcpListener::bind(&address).await.unwrap();
line(
PrintType::OmegaIn,
"WebSocket server listening on 0.0.0.0:959",
PrintType::General,
&format!("WebSocket server listening on {}", &address),
);
while let Ok((stream, _)) = listener.accept().await {