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?
When I use
tokio::net::tcpstream
andstd::net::tcpstream
to build communication with therunner
in theenclave
, I find that when the length of the transmitted data exceeds 16384, thetokio::net::tcpstream
method will divide the write into several times, while thestd::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?
https://github.com/fortanix/rust-sgx/blob/b6f0262614ce1574b7d66226b68d7247b822d860/intel-sgx/enclave-runner/src/usercalls/interface.rs#L73-L77
I mainly understand the size of
len
through theL77
line of code.Thank You!!