Conversation
b30366d to
4be8245
Compare
|
Refactoring is complete, please review it. @SajjadPourali |
80e3fe5 to
25cd26c
Compare
|
|
||
| #[tokio::main] | ||
| async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| dotenvy::dotenv().ok(); |
There was a problem hiding this comment.
Did we use environment variables in this example?
There was a problem hiding this comment.
yes, we use .env file.
| ) -> Poll<std::io::Result<()>> { | ||
| fn poll_read(mut self: std::pin::Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut tokio::io::ReadBuf<'_>) -> Poll<std::io::Result<()>> { | ||
| loop { | ||
| if self.tcb.retransmission.is_some() { |
There was a problem hiding this comment.
Not exactly sure how retransmission is handled here. Is this one moved to the PacketStatus::RetransmissionRequest => {...} later in the same function?
| tokio = { version = "1.43", default-features = false, features = [ | ||
| "rt-multi-thread", | ||
| ] } | ||
| tun = { version = "0.7.13", default-features = false, features = ["async"] } |
There was a problem hiding this comment.
We can also rename tun2.rs example to tun.rs if you wish
|
Thanks |
|
Please publish it. |
|
Now, the final problem of the crate is introducing congestion control. |
I’m doing some benchmark tests and will publish it a bit later.
Network congestion is unlikely under normal conditions for the intended use of this crate, but extreme system load or resource exhaustion may cause issues. Implementing a simple AIMD mechanism could enhance its stability. |
No description provided.