Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Implement support for notification namespaces. #9

Open
jmalloc opened this issue Sep 18, 2017 · 1 comment
Open

Implement support for notification namespaces. #9

jmalloc opened this issue Sep 18, 2017 · 1 comment
Assignees

Comments

@jmalloc
Copy link
Contributor

jmalloc commented Sep 18, 2017

Using the notation from the source code, the new message formats are as follows:

LISTEN: 'NL', // preamble, [namespaces]
UNLISTEN: 'NU', // preamble, [namespaces]

To be clear, namespaces is an array of strings, meaning that the header will be a single-element array containing another array.

  • Both operations are idempotent, listening/unlistening to the same namespace multiple times has no effect and is not an error.
  • Messages can be sent at any time.
  • The only failure mode is a broker connection failure, in which case the websocket connection is closed anyway, so there is no message returned indicating a success (just like session create/destroy).

Additionally, the existing NOTIFICATION type gains namespace at the start of the header:

NOTIFICATION: 'NO', // preamble, [namespace, notificationType], payload
@jmalloc
Copy link
Contributor Author

jmalloc commented Sep 18, 2017

Blocked by rinq/httpd#11

@jmalloc jmalloc changed the title Implement support for listen/unlisten messages. Implement support for notification namespaces. Sep 18, 2017
@koden-km koden-km self-assigned this Nov 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants