Jovi Hsu
Jovi Hsu
Also seeking for a solution. Anyone here can help?
I have used this change to make a temporary solution, if there is anything else to add please let me know. ```diff diff --git a/3rd_src/libhttp-1.8/src/httplib_close_connection.c b/3rd_src/libhttp-1.8/src/httplib_close_connection.c index 2e84178..006ba5e 100644 ---...
Hi all here, I've got the same scenario that needs in [my app](https://github.com/HsuJv/webgateway/tree/main/webvnc) (In fact is WebSocket). And found this issue seems inactive for quite a long time so I...
Maybe I can add some APIs like `upload/download_with_notifier` to send events via channels. Or something like `upload/download_with_notify_callback` to call callbacks during the process. But this might change the current code...
感谢您的提议。 关于您提议的三点, 1. 中断:在`run_local`模式下,所有操作都需要同步完成,所以无论是`scp`还是`exec`都无法增加这个api,但是在`run_backend`模式下,或许可以增加类似的api。对于SSH来说,用户每开启一个channel,在服务器端都是并发执行的,所以如果只是为了多任务执行,可以使用`run_backend`模式同时打开多个channel,如果是为了阻止先前命令产生的副作用,那还是需要一个`cancel`或者`abort`的api,之前设计的时候没有考虑到。 2. scp传输完成率:基于当前的设计,`local`模式或许可以在log里面增加相关打印,但是依然是前述问题,因为同步执行,无法提供单独api。`backend`模式目前的处理是先把文件全部读入内存然后提交到后台线程进行传输,所以可以提供所需api,会在后续更新中留意。 3. 异步:如果只是单纯的指异步地执行ssh的相关操作,那么`run_backend`模式已经有了相关实现,保留同步执行的目的是为了兼容单线程执行环境(WASI,虽然目前对WASI的适配还在进行中)。如果是指`async`关键词的异步代码,这个改动或许有些巨大,需要把所有使用`where S: Read + Write`签名的方法全部重写,目前好像还没有一个好的方案能用同一套底层代码同时支持同步和异步io,关于这个改动是否要进行还在考虑中,或许会新开一个库来实现,因为并不是所有场景都适合引入异步进行时。 如果还有更多建议与问题,烦请告知 BRs. P.S. 关于并发执行的POC,您可以尝试 ```Rust use ssh_rs::ssh; fn main() { ssh::enable_log(); let mut session = ssh::create_session() .username("ubuntu") .password("password")...
Just for your information I tried to propagate the warning from the library itself to the web console and got the following result  It seems that the tpkt...
@KillingSpark , Thanks for the information! I tried the example in the issue, and it works well with 1024 bytes per send call. But when I increase the send data...
I've got no idea but I'll try it out later. Anyway thanks for the help. Let's leave the issue here to see if anyone else would like to answer.
It seems something is wrong within the `SCTP` I just wrote a simple POC to do a throughput test ```Rust use clap::{App, AppSettings, Arg}; use std::io::Write; use std::sync::Arc; use tokio::net::UdpSocket;...
My UDP snippets were like this ```Rust fn main() -> Result { env_logger::Builder::new() .format(|buf, record| { writeln!( buf, "{}:{} [{}] {} - {}", record.file().unwrap_or("unknown"), record.line().unwrap_or(0), record.level(), chrono::Local::now().format("%H:%M:%S.%6f"), record.args() ) })...