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

Commit ddebf48

Browse files
committed
Simplified version string.
1 parent db3844d commit ddebf48

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

api-websockets.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ versioned as a whole.
66

77
## Status
88
This is a _draft_ protocol.
9-
This specific version is identified by the string `solid-ws-draft/v0.1.0-alpha`.
9+
This specific version is identified by the string `solid/0.1.0-alpha`.
1010

1111
## Protocol description
1212

@@ -41,38 +41,38 @@ Updates-Via: wss://example.org
4141
### Connection
4242
Then, the client needs to open a WebSocket connection
4343
to that URI.
44-
The client _SHOULD_ include the protocol version `solid-ws-draft/v0.1.0-alpha`
44+
The client _SHOULD_ include the protocol version `solid/0.1.0-alpha`
4545
in the `Sec-WebSocket-Protocol` header.
4646

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

4949
```
50-
const socket = new WebSocket('wss://example.org', ['solid-ws-draft/v0.1.0-alpha']);
50+
const socket = new WebSocket('wss://example.org', ['solid/0.1.0-alpha']);
5151
```
5252

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

5656
```
57-
protocol solid-ws-draft/v0.1.0-alpha
57+
protocol solid/0.1.0-alpha
5858
warning Unstandardized protocol version, proceed with care
5959
```
6060

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

6464
```
65-
warning Missing Sec-WebSocket-Protocol header, expected value 'solid-ws-draft/v0.1.0-alpha'
65+
warning Missing Sec-WebSocket-Protocol header, expected value 'solid/0.1.0-alpha'
6666
```
6767

6868
Otherwise, if the set of values obtained
6969
from parsing the `Sec-WebSocket-Protocol` header
70-
does not contain `solid-ws-draft/v0.1.0-alpha`,
70+
does not contain `solid/0.1.0-alpha`,
7171
then the server SHOULD emit a warning
7272
and SHOULD close the connection:
7373

7474
```
75-
error Client does not support protocol solid-ws-draft/v0.1.0-alpha
75+
error Client does not support protocol solid/0.1.0-alpha
7676
```
7777

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

130130
```js
131-
var socket = new WebSocket('wss://example.org/', ['solid-ws-draft/v0.1.0-alpha']);
131+
var socket = new WebSocket('wss://example.org/', ['solid/0.1.0-alpha']);
132132
socket.onopen = function() {
133133
this.send('sub https://example.org/data/test');
134134
};

0 commit comments

Comments
 (0)