1. 解决无法连接服务的问题

2. 解决运行时嵌套的问题
3. 目前已经可以RPC成功了。但是需要debug目录匹配的问题,虚拟目录需要本地处理好
This commit is contained in:
Ekko.bao 2024-07-24 13:19:40 +08:00
parent 022a31a489
commit dab0668ac3
2 changed files with 500 additions and 318 deletions

View File

@ -1,4 +1,5 @@
use lws_client::LwsVfsIns;
use std::thread;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let lws_ins = match LwsVfsIns::new("config.json").await {
@ -8,12 +9,33 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
return Err(e);
}
};
match lws_ins.hello(){
println!("start hello process");
match lws_ins.hello().await {
Err(e) => {
println!("lws client instance hello err {:?}", e);
return Err(e);
}
_ => {}
}
println!("start mount process");
let handle = thread::spawn(move ||{
match LwsVfsIns::mount(lws_ins) {
Ok(_) => {
Ok::<i32, String>(0)
},
_ =>{},
Err(e) => {
println!("mount err {:?}", e);
Ok::<i32, String>(-1)
}
}
});
match handle.join() {
Ok(_) => {
Ok(())
},
Err(e) => {
eprintln!("mount thread start err {:?}", e);
Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, "mount fail")))
}
}
LwsVfsIns::mount(lws_ins)
}

File diff suppressed because it is too large Load Diff