Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStreamDialer ¶
func NewStreamDialer(dialer transport.StreamDialer, prefixBytes int64) (transport.StreamDialer, error)
NewStreamDialer creates a transport.StreamDialer that splits the outgoing stream after writing "prefixBytes" bytes using [SplitWriter].
func NewWriter ¶
NewWriter creates a io.Writer that ensures the byte sequence is split at prefixBytes. A write will end right after byte index prefixBytes - 1, before a write starting at byte index prefixBytes. For example, if you have a write of [0123456789] and prefixBytes = 3, you will get writes [012] and [3456789]. If the input writer is a io.ReaderFrom, the output writer will be too.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.