logoalt Hacker News

rwmjtoday at 10:21 AM1 replyview on HN

Indeed you can, but we've found it useful to use MSG_MORE when using state machines, where different states are responsible for different parts of the reply. (Plenty of examples in states*.c here: https://gitlab.com/nbdkit/libnbd/-/tree/master/generator?ref...)


Replies

mgaunardtoday at 10:28 AM

Doing more system calls isn't really a good idea for performance.

Also if you're doing asynchronous writes you typically can only have one write in-flight at any time, you should aggregate all other buffers while that happens.

Though arguably asynchronous writes are often undesired due to the complexity of doing flow-control with them.

show 1 reply