PipeStream

Provides a stream interface to a UNIX pipe fd-pair

Constructors

this
this(int readEnd, int writeEnd)

Constructs a new piped-stream with the file descriptors of the read and write ends provided

Members

Functions

close
void close()

Closes both pipe pairs

read
ulong read(byte[] toArray)

Reads bytes from the pipe into the provided array and returns without any further waiting, at most the number of bytes read will be the length of the provided array, at minimum a single byte

readFully
ulong readFully(byte[] toArray)

Reads bytes from the pipe into the provided array until the array is fully-filled

write
ulong write(byte[] fromArray)
Undocumented in source. Be warned that the author may not have intended to support it.
writeFully
ulong writeFully(byte[] fromArray)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

newPipe
PipeStream newPipe()

Creates a new anonymous pipe and attaches it to a newly created PipeStream

Meta