iggy icon indicating copy to clipboard operation
iggy copied to clipboard

Use `sendfile()` in PollMessages for TCP

Open hubcio opened this issue 1 year ago • 2 comments

This is supported only on Linux.

hubcio avatar Feb 01 '24 10:02 hubcio

Hi, @hubcio I'm unfamiliar with the usage of sendfile and would like to inquire how to read bytes from a file into Vec using sendfile

iamazy avatar Mar 01 '24 07:03 iamazy

@iamazy unfortunately, this API is blocking so it'll be pain in the ass to do it in tokio. we'd have to implement separate thread pool or use tokio::block_on

hubcio avatar Mar 01 '24 14:03 hubcio