Skip to content

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

@yingjun-wu

Description

@yingjun-wu

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!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions