Skip to content

Commit 2ca71dc

Browse files
committed
Server-protocol: Document "crowded" and "closed" error cases
1 parent 2fafd92 commit 2ca71dc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server-protocol.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,13 @@ coming from the other client.
230230
Each mailbox is "opened" by some number of clients at a time, until all
231231
clients have closed it. Mailboxes are kept alive by either an open client, or
232232
a Nameplate which points to the mailbox (so when a Nameplate is deleted from
233-
inactivity, the corresponding Mailbox will be too).
233+
inactivity, the corresponding Mailbox will be too). The mailbox server makes
234+
sure a mailbox can never be opened by more than two parties, neither
235+
simultaneously not cumulatively. Trying to open a mailbox as a third party
236+
results in a "crowded" error for that attempt. Moreover, when a client connects
237+
to a mailbox which the other client closed and thus has no chance of ever seeing
238+
a its peer, the server may reject its attempt to open the mailbox with an error
239+
message.
234240

235241
The `open` command both marks the mailbox as being opened by the bound side,
236242
and also adds the WebSocket as subscribed to that mailbox, so new messages

0 commit comments

Comments
 (0)