Conversation
修改支持udp、ws等协议 新增from_socket函数 支持从stream启动
|
Hi @YDHCUI ! Thanks for the contribution. Few things we will need to address before merge: 1. cargo clippy and cargo fmt need to pass2. Performance Regression: Boxing StreamsFiles: Before: read_stream: tokio::net::tcp::OwnedReadHalf,
write_stream: Arc<tokio::sync::Mutex<tokio::net::tcp::OwnedWriteHalf>>,After: read_stream: Box<dyn AsyncRead + Unpin + Send + Sync>,
write_stream: Arc<tokio::sync::Mutex<Box<dyn AsyncWrite + Unpin + Send + Sync>>>,Issue: Every read/write operation now goes through:
For a VNC server performing thousands of small I/O operations per second, this adds measurable overhead. The original concrete types allowed the compiler to inline and optimize I/O calls. 3. Performance Regression:
|
dustinmcafee
left a comment
There was a problem hiding this comment.
Thanks for your addition! I really like the idea -- few requested fixes, however -- Please check previous Conversation comment.
修改支持udp、ws等协议
新增from_socket函数 支持从stream启动