@@ -6,7 +6,7 @@ versioned as a whole.
6
6
7
7
## Status
8
8
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 ` .
10
10
11
11
## Protocol description
12
12
@@ -41,38 +41,38 @@ Updates-Via: wss://example.org
41
41
### Connection
42
42
Then, the client needs to open a WebSocket connection
43
43
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 `
45
45
in the ` Sec-WebSocket-Protocol ` header.
46
46
47
47
For example, in JavaScript, this could be done as follows:
48
48
49
49
```
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']);
51
51
```
52
52
53
53
Upon connection,
54
54
the server SHOULD indicate the protocol version as follows:
55
55
56
56
```
57
- protocol solid-ws-draft/v0 .1.0-alpha
57
+ protocol solid/0 .1.0-alpha
58
58
warning Unstandardized protocol version, proceed with care
59
59
```
60
60
61
61
If the client did not specify a ` Sec-WebSocket-Protocol ` header,
62
62
the server SHOULD warn the client as follows:
63
63
64
64
```
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'
66
66
```
67
67
68
68
Otherwise, if the set of values obtained
69
69
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 ` ,
71
71
then the server SHOULD emit a warning
72
72
and SHOULD close the connection:
73
73
74
74
```
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
76
76
```
77
77
78
78
### Subscription
@@ -128,7 +128,7 @@ Here is a Javascript example on how to subscribe to live updates for a `test`
128
128
resource at ` https://example.org/data/test ` :
129
129
130
130
``` 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' ]);
132
132
socket .onopen = function () {
133
133
this .send (' sub https://example.org/data/test' );
134
134
};
0 commit comments