use std.Io.Writer #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/26/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow up to pull request #24 where I changed pulsar to use std.Io.Reader.
@desttinghim wrote in https://codeberg.org/klaji/pulsar/pulls/26#issuecomment-6953090:
I don't think the tagstruct functions need to guarantee that it only does complete writes, as that is more easily done somewhere higher up the chain. In
src/pulseaudio.zigin thebeginControlPacketfunction, for example, I create fixed buffer writer, which will returnerror.WriteFailedif the buffer is full. I would argue that it makes more sense in the pulseaudio implementation, which requires a length prefix, and thus must buffer or pre-calculate the length; whereas nothing in thetagstructformat actually dictates buffering.