Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in Handling Large Data Writes: tokio::net::TcpStream vs std::net::TcpStream` #615

Open
yingjun-wu opened this issue Jun 13, 2024 · 0 comments

Comments

@yingjun-wu
Copy link

When I use tokio::net::tcpstream and std::net::tcpstream to build communication with the runner in the enclave, I find that when the length of the transmitted data exceeds 16384, the tokio::net::tcpstreammethod will divide the write into several times, while the std::net::tcpstream method will not. Why is this?

Is there any way to change this method, because when splitting multiple transmissions, the overall delay will be much larger than one transmission time?

fn write(
self,
fd: Fd,
buf: *const u8,
len: usize,

I mainly understand the size of len through the L77 line of code.

Thank You!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant