Clearer naming

This commit is contained in:
Gregor Reitzenstein 2020-05-10 17:23:36 +02:00
parent 864d20b849
commit 120ee4ea80

View File

@ -24,28 +24,34 @@
using Auth = import "auth.capnp";
using Api = import "api.capnp";
using Rpc = import "rpc.capnp";
struct Message {
union {
open @0 :Open;
# Initialize a connection to the other end
greet @0 :Greeting;
# Be polite and say hello to the other end
close @1 :Void;
# The stream can be closed by either end at any time by sending this
# tag.
auth @2 :Auth.AuthMessage;
auth @1 :Auth.AuthMessage;
# Start an authenticaion exchange
# TODO: RPC & Crypto
starttls @2 :Void;
# Start a tls handshake
# TODO: RPC bootstrapping
}
}
struct Open {
struct Greeting {
# Be nice and say hello to each other first
# A client sends this message to a server first thing
# A client sends this message to a server first thing, a server then replies
# similarly
major @0 :UInt32; # The major part of the API version
minor @1 :UInt32; # The minor part of the API version
# Hello, I'm …
host @0 :Text; # non-qualified Hostname of the client/server, as applicable
# using the program …
program @1 :Text; # SHOULD be of the form `programname-version`
# and speak the API version …
major @2 :UInt32; # The major part of the API version
minor @3 :UInt32; # The minor part of the API version
}