mirror of
https://github.com/NixOS/nix
synced 2025-07-02 13:31:48 +02:00
Merge pull request #9157 from obsidiansystems/protocol-versions
Add protocol versions to `{Worker,Serve}Proto::*Conn`
This commit is contained in:
commit
4d17c59d8d
11 changed files with 207 additions and 83 deletions
|
@ -818,10 +818,16 @@ static void opServe(Strings opFlags, Strings opArgs)
|
|||
if (magic != SERVE_MAGIC_1) throw Error("protocol mismatch");
|
||||
out << SERVE_MAGIC_2 << SERVE_PROTOCOL_VERSION;
|
||||
out.flush();
|
||||
unsigned int clientVersion = readInt(in);
|
||||
ServeProto::Version clientVersion = readInt(in);
|
||||
|
||||
ServeProto::ReadConn rconn { .from = in };
|
||||
ServeProto::WriteConn wconn { .to = out };
|
||||
ServeProto::ReadConn rconn {
|
||||
.from = in,
|
||||
.version = clientVersion,
|
||||
};
|
||||
ServeProto::WriteConn wconn {
|
||||
.to = out,
|
||||
.version = clientVersion,
|
||||
};
|
||||
|
||||
auto getBuildSettings = [&]() {
|
||||
// FIXME: changing options here doesn't work if we're
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue