Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover subscriptions by module name #843

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,29 @@ given |event name| and |session| is:

</div>

<div algorithm>
To <dfn>obtain a set of event names</dfn> given a |name|:

1. Let |events| be an empty [=/set=].

1. If |name| contains a U+002E (period):

1. If |name| is the [=event name=] for an event, append |name| to |events|
and return [=success=] with data |events|.

1. Return an [=error=] with [=error code=] [=invalid argument=]

1. Otherwise |name| is interpreted as representing all the events in a
module. If |name| is not a [=module name=] return an [=error=] with
[=error code=] [=invalid argument=].

1. Append the [=event name=] for each [=event=] in the module with name |name| to
|events|.

1. Return [=success=] with data |events|.

</div>

# Transport # {#transport}

Message transport is provided using the WebSocket protocol.
Expand Down Expand Up @@ -1897,7 +1920,11 @@ Issue: This needs to be generalized to work with realms too.
<div algorithm="remote end steps for session.subscribe">
The [=remote end steps=] with |session| and |command parameters| are:

1. Let the |event names| be [=set/create|create a set=] with |command parameters|["<code>events</code>"].
1. Let |event names| be an empty [=/set=].

1. For each entry |name| in |command parameters|["<code>events</code>"],
OrKoN marked this conversation as resolved.
Show resolved Hide resolved
let |event names| be the union of |event names| and the result of
OrKoN marked this conversation as resolved.
Show resolved Hide resolved
[=trying=] to [=obtain a set of event names=] with |name|.

1. Let |subscription navigables| be a [=/set=].

Expand Down Expand Up @@ -2001,7 +2028,11 @@ The [=remote end steps=] with |session| and |command parameters| are:

1. If |command parameters| matches the <code>session.UnsubscribeByAttributesRequest</code> production:

1. Let |event names| be [=set/create|create a set=] with |command parameters|["<code>events</code>"].
1. Let |event names| be an empty [=/set=].

1. For each entry |name| in |command parameters|["<code>events</code>"],
let |event names| be the union of |event names| and the result of
OrKoN marked this conversation as resolved.
Show resolved Hide resolved
[=trying=] to [=obtain a set of event names=] with |name|.

1. Let |top-level traversable context ids| be a [=/set=].

Expand Down