bufd

Create a buffer to manage the data from the given source, and wrap into an iopipe.

  1. auto bufd(Source dev, Args args)
  2. auto bufd(Args args)
    bufd
    (
    T = ubyte
    size_t optimalReadSize = (T.sizeof > 4 ? 8 : 32 / T.sizeof)
    Args...
    )
    (
    Args args
    )

Parameters

Allocator

The allocator to use for managing the buffer

args Args

Arguments passed to the allocator (for allocators that need initialization)

Return Value

Type: auto

An iopipe that uses the given buffer to read data from the given device source. The version which takes no parameter uses a NullDev as a source.

Meta