Expand description
Low-level helpers for the nix-daemon wire format.
Structs§
- Framed
Reader - Reader compatible with CppNix’ FramedSource/FramedSink protocol.
Enums§
- Op
- Opcodes.
- Stderr
Kind
Constants§
- WORKER_
MAGIC_ 1 - Magic number sent by the client.
- WORKER_
MAGIC_ 2 - Magic number sent by the daemon.
Functions§
- copy_
to_ framed - read_
bool - Read a boolean from the stream, encoded as u64 (>0 is true).
- read_
build_ mode - Read a build mode from the stream.
- read_
build_ result - read_
build_ result_ status - Read a build result status from the stream.
- read_
client_ settings - Read a ClientSettings structure from the stream.
- read_
datetime - Read a DateTime (CppNix: time_t) from the stream, encoded as a unix timestamp.
- read_
error - Read a NixError struct from the stream.
- read_op
- Read an opcode from the stream.
- read_
pathinfo - Read a PathInfo structure from the stream.
- read_
proto - Read a protocol version from the stream.
- read_
stderr - read_
stderr_ fields - read_
stderr_ result - read_
stderr_ start_ activity - read_
string - Read a string from the stream. Strings are prefixed with a u64 length, but the data is padded to the next 8-byte boundary, eg. a 1-byte string becomes 16 bytes on the wire: 8 for the length, 1 for the data, then 7 bytes of discarded 0x00s.
- read_
strings - Read a list (or set) of strings from the stream - a u64 count, followed by that
many strings using the normal
read_string()
encoding. - read_
u64 - Read a u64 from the stream (little endian).
- read_
verbosity - Read a verbosity level from the stream.
- write_
bool - Write a boolean to the stream, encoded as u64 (>0 is true).
- write_
build_ mode - Write a build mode to the stream.
- write_
build_ result - write_
build_ result_ status - Write a build result status to the stream.
- write_
client_ settings - Writes a ClientSettings structure to the stream.
- write_
datetime - Write a DateTime (CppNix: time_t) from the stream, encoded as a unix timestamp.
- write_
error - Write a NixError struct to the stream.
- write_
op - Write an opcode to the stream.
- write_
pathinfo - Write a PathInfo structure to the stream.
- write_
proto - Write a protocol version to the stream.
- write_
stderr - write_
stderr_ fields - write_
stderr_ result - write_
stderr_ start_ activity - write_
string - Write a string to the stream. See: NixReader::read_string.
- write_
strings - Write a list of strings to the stream.
- write_
u64 - Write a u64 from the stream (little endian).
- write_
verbosity - Write a verbosity level to the stream.