Skip to content

Commit

Permalink
Server-protocol: Allow claiming without allocating
Browse files Browse the repository at this point in the history
  • Loading branch information
piegamesde committed Mar 26, 2023
1 parent 921fd50 commit c6569d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ it (to avoid a race condition), but for simplicity, clients can send a claim for
all nameplates, even ones which they've allocated themselves.
Note that a claim (and therefore an allocation) also automatically opens the
mailbox, see below.
The `claim` command has the optional boolean field `dont-allocate`, which if set
will result in an error if the to be claimed nameplate does not already exist.
The intent behind this is clients who want to insure themselves against user
mistakes when entering a nameplate.

Nameplates (on the server) must live until the second client has learned
about the associated mailbox, after which point they can be reused by other
Expand Down Expand Up @@ -302,7 +306,7 @@ any), and which ones provoke direct responses:
* ~~S->C nameplates {nameplates: [{id: str},..]}~~ (always empty response)
* (C->S) allocate {} -> allocated
* S->C allocated {nameplate:}
* (C->S) claim {nameplate:} -> claimed
* (C->S) claim {nameplate:, dont-allocate:?bool} -> claimed
* S->C claimed {mailbox:}
* ~~(C->S) release {nameplate:?} -> released~~ (deprecated)
* ~~S->C released~~
Expand Down

0 comments on commit c6569d7

Please sign in to comment.