fix udp and refactor native network

This commit is contained in:
John Smith
2021-12-31 22:09:30 -05:00
parent c6f573ffe0
commit 0e0209a54b
18 changed files with 870 additions and 760 deletions

View File

@@ -156,17 +156,20 @@ pub async fn main() -> Result<(), String> {
settingsrw.logging.terminal.level = settings::LogLevel::Trace;
}
if matches.is_present("attach") {
settingsrw.auto_attach = !matches!(matches.value_of("attach"), Some("false"));
settingsrw.auto_attach = !matches!(matches.value_of("attach"), Some("true"));
}
if matches.occurrences_of("bootstrap") != 0 {
let bootstrap = match matches.value_of("bootstrap") {
Some(x) => {
println!("Overriding bootstrap with: ");
let mut out: Vec<settings::ParsedUrl> = Vec::new();
let mut out: Vec<settings::ParsedNodeDialInfo> = Vec::new();
for x in x.split(',') {
println!(" {}", x);
out.push(settings::ParsedUrl::from_str(x).map_err(|e| {
format!("unable to parse url in bootstrap list: {} for {}", e, x)
out.push(settings::ParsedNodeDialInfo::from_str(x).map_err(|e| {
format!(
"unable to parse dial info in bootstrap list: {} for {}",
e, x
)
})?);
}
out
@@ -197,6 +200,7 @@ pub async fn main() -> Result<(), String> {
cb.add_filter_ignore_str("async_tungstenite");
cb.add_filter_ignore_str("tungstenite");
cb.add_filter_ignore_str("netlink_proto");
cb.add_filter_ignore_str("netlink_sys");
if settingsr.logging.terminal.enabled {
logs.push(TermLogger::new(