Tokio's write_vectored with DuplexStream

I'm trying to write a scatter/gather list using write_vectored. In my test I'm writing "hello," and " world" to a DuplexStream (with a 64K internal buffer).

In the test it seems to just write the first buffer before returning, which is surprising to me -- I would have expected it to write both buffers.

Is this just a DuplexStream thing, or doesn't write_vectored try to minimize the number of write calls?

It's possible that DuplexStream doesn't support vectored writes. Could you open an issue for that?

1 Like

Will do!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.