snix/web/content/docs/reference/nix-daemon-protocol/handshake.md
Florian Klink 8101e7a45f docs(reference/nix-daemon-protocol): migrate
This moves the daemon protocol reference to the "Reference" section in
our new docs.

It also updates them a bit, we now use `{{< relref "path/to/file.md" >}}`
to refer to other files, and fixes the (previously broken) references
in handshake.md.

Change-Id: I114e40622dc504e7a5f75946895900e797a1e722
Reviewed-on: https://cl.snix.dev/c/snix/+/30273
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Brian Olsen <brian@maven-group.org>
2025-03-24 17:33:58 +00:00

1.2 KiB

title slug description summary date lastmod draft weight toc
Handshake handshake 2025-03-24T13:10:37+02:00 2025-03-24T13:10:37+02:00 false 51 true

When connecting, the handshake sequence documented below must be performed, so client and server can agree on a protocol version to use and exchange some parameters.

client -> server

  • 0x6e697863 :: Int (hardcoded, 'nixc' in ASCII)

client <- server

  • 0x6478696f :: Int (hardcoded, 'dxio' in ASCII)
  • protocolVersion :: Int

client -> server

  • clientVersion :: Int

If clientVersion is 1.14 or later

  • sendCpu :: Bool (hardcoded to false in client)

If sendCpu is true

  • cpuAffinity :: Int (obsolete and ignored)

If clientVersion is 1.11 or later

  • reserveSpace :: Bool (obsolete, ignored and set to false)

client <- server

If clientVersion is 1.33 or later

  • nixVersion :: String

If clientVersion is 1.35 or later

  • trusted :: OptTrusted

client <- server

  • send logs
  • [operation]({{< relref "operations.md" >}}) :: Int

[se-Int]: {{< relref "serialization.md" >}}#int [se-Bool]: {{< relref "serialization.md" >}}#bool