Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Drop alpha from version number.
Browse files Browse the repository at this point in the history
See #221
  • Loading branch information
RubenVerborgh committed Jun 17, 2020
1 parent 3468665 commit 7b5cb3f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions api-websockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ versioned as a whole.

## Status
This is a _draft_ protocol.
This specific version is identified by the string `solid-0.1-alpha`.
This specific version is identified by the string `solid-0.1`.

## Protocol description

Expand Down Expand Up @@ -41,38 +41,38 @@ Updates-Via: wss://example.org
### Connection
Then, the client needs to open a WebSocket connection
to that URI.
The client _SHOULD_ include the protocol version `solid-0.1-alpha`
The client _SHOULD_ include the protocol version `solid-0.1`
in the `Sec-WebSocket-Protocol` header.

For example, in JavaScript, this could be done as follows:

```
const socket = new WebSocket('wss://example.org', ['solid-0.1-alpha']);
const socket = new WebSocket('wss://example.org', ['solid-0.1']);
```

Upon connection,
the server SHOULD indicate the protocol version as follows:

```
protocol solid-0.1-alpha
protocol solid-0.1
warning Unstandardized protocol version, proceed with care
```

If the client did not specify a `Sec-WebSocket-Protocol` header,
the server SHOULD warn the client as follows:

```
warning Missing Sec-WebSocket-Protocol header, expected value 'solid-0.1-alpha'
warning Missing Sec-WebSocket-Protocol header, expected value 'solid-0.1'
```

Otherwise, if the set of values obtained
from parsing the `Sec-WebSocket-Protocol` header
does not contain `solid-0.1-alpha`,
does not contain `solid-0.1`,
then the server SHOULD emit a warning
and SHOULD close the connection:

```
error Client does not support protocol solid-0.1-alpha
error Client does not support protocol solid-0.1
```

### Subscription
Expand Down Expand Up @@ -128,7 +128,7 @@ Here is a Javascript example on how to subscribe to live updates for a `test`
resource at `https://example.org/data/test`:

```js
var socket = new WebSocket('wss://example.org/', ['solid-0.1-alpha']);
var socket = new WebSocket('wss://example.org/', ['solid-0.1']);
socket.onopen = function() {
this.send('sub https://example.org/data/test');
};
Expand Down

0 comments on commit 7b5cb3f

Please sign in to comment.