Fixed warnings and migrated to TTP.

This commit is contained in:
Ben Markendorf 2026-03-19 21:02:47 +01:00
commit 7a331d4450
20 changed files with 107 additions and 55 deletions

View file

@ -3,14 +3,14 @@ use crate::{
rho::connection::GeneralConnection,
util::{file_util::load_file_vec, logger::PrintType},
};
use epsilon_native::Host;
use ttp_native::Host;
pub async fn start(port: u16) -> Result<(), Box<dyn std::error::Error>> {
let cert_pem = load_file_vec("certs", "cert.pem").expect("Error loading Pemfile");
let key_pem = load_file_vec("certs", "key.pem").expect("Error loading Keyfile");
let mut host: Host = epsilon_native::host(port, cert_pem, key_pem).await?;
let mut host: Host = ttp_native::host(port, cert_pem, key_pem).await?;
log!(0, PrintType::General, "Server listening on port {}", port);
while let Some((sender, receiver)) = host.next().await {