Initial migration to MTP [Broken]
This commit is contained in:
parent
5728280ac9
commit
7ea84cc54b
15 changed files with 965 additions and 1190 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use std::net::{IpAddr, Ipv4Addr};
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::{
|
||||
|
|
@ -5,7 +6,7 @@ use crate::{
|
|||
rho::connection::GeneralConnection,
|
||||
util::{file_util::load_file_vec, logger::PrintType},
|
||||
};
|
||||
use ttp_native::{Host, Policy, SendMode, host};
|
||||
use mtp::transport::{Host, Policy, SendMode, 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");
|
||||
|
|
@ -13,6 +14,7 @@ pub async fn start(port: u16) -> Result<(), Box<dyn std::error::Error>> {
|
|||
let key_pem = load_file_vec("certs", "key.pem").expect("Error loading Keyfile");
|
||||
|
||||
let mut host: Host = host(
|
||||
IpAddr::V4(Ipv4Addr::UNSPECIFIED),
|
||||
port,
|
||||
cert_pem,
|
||||
key_pem,
|
||||
|
|
|
|||
Loading…
Reference in a new issue