/
664.txt
784 lines (582 loc) · 35.8 KB
/
664.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
[116] [DFN[[[WebSocket]]]] は、 [[Web]] で[[サーバー]]と[[クライアント]]の間で双方向通信を行うための[[プロトコル]]です。
* 仕様書
[96] [[鯖]]と[[クライアント]]の間の[[プロトコル]]は、 [[IETF]]
が出版する [DFN[[[RFC 6455]]]] [SRC[>>115]] によって規定されています。
[97] [[Webブラウザー]]上の [[API]] は、
[[WHATWG]] が出版する [[HTML Standard]] [SRC[>>131]] によって規定されています。
[161] 両者の境界部分である、 [[URL]] から接続を確立する部分は、
[[WHATWG]] の [[Fetch Standard]] [SRC[>>160]] によって規定されています。
[REFS[
- [115] '''[CITE@en[RFC 6455 - The WebSocket Protocol]] ([TIME[2015-03-11 20:42:50 +09:00]] 版) <http://tools.ietf.org/html/rfc6455>'''
-- [117] [CITE@en[RFC 6455 - The WebSocket Protocol]] ([TIME[2015-03-11 20:42:50 +09:00]] 版) <http://tools.ietf.org/html/rfc6455#section-1.7>
-- [120] [CITE@en[RFC 6455 - The WebSocket Protocol]] ([TIME[2015-03-11 20:42:50 +09:00]] 版) <http://tools.ietf.org/html/rfc6455#section-2.1>
-- [123] [CITE@en[RFC 6455 - The WebSocket Protocol]] ([TIME[2015-03-11 20:42:50 +09:00]] 版) <http://tools.ietf.org/html/rfc6455#section-10.6>
-- [125] [CITE@en[RFC 6455 - The WebSocket Protocol]] ([TIME[2015-03-11 20:42:50 +09:00]] 版) <http://tools.ietf.org/html/rfc6455#section-11.2>
- [127] [CITE[RFC Errata Report]] ([TIME[2015-05-16 22:20:56 +09:00]] 版) <http://www.rfc-editor.org/errata_search.php?rfc=6455>
- [106] [CITE[WebSocket Protocol Registries]]
( ([TIME[2014-11-07 07:21:35 +09:00]] 版))
<http://www.iana.org/assignments/websocket/websocket.xhtml>
- [160] '''[CITE@en-US[Fetch Standard]] ([TIME[2016-03-11 02:17:17 +09:00]] 版) <https://fetch.spec.whatwg.org/#websocket-protocol>'''
- [131] '''[CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-05-06 10:42:35 +09:00]] 版) <https://html.spec.whatwg.org/#network>'''
]REFS]
* プロトコル
[138] [[WebSocketサーバー]]は、 [[TCP]] や [[TLS]] over [[TCP]]
の接続待ち状態で、[[WebSocketクライアント]]からの接続を待機します。
[[WebSocketクライアント]]は、適切なタイミング
([[[CODE(DOMi)@en[WebSocket]]コンストラクター]]の実行や、それに相当する操作が行われたタイミング)
で、 [[WebSocket接続の確立]]操作を行い、 [[WebSocketサーバー]]との [[handshake]]
によって実際の通信が行える状態となります。
[139] 以後、 [[WebSocketサーバー]]および [[WebSocketクライアント]]は、
適宜[[WebSocketメッセージ送信]]を行うことができます。
また必要に応じて[[[CODE[Ping]]フレーム]]や[[[CODE[Pong]]フレーム]]を送ることができます。
それと同時に [[WebSocketメッセージ受信]]処理により、相手側からの[[フレーム]]を処理します。
[140] [[WebSocketサーバー]]および[[WebSocketクライアント]]は、
適当なタイミングで [[[CODE[Close]]フレーム]]を送信し、
[[closing handshake]] を行うことができます。また [[handshake]]
や送受信の途中で問題が発生すると、[[WebSocket接続]]を閉じることになります。
いずれにせよ、所定の手続きで [[WebSocket接続]]を閉じ、下位の [[TCP接続]] (や [[TLS]])
も閉じ、 [CODE(DOMi)@en[[[WebSocket]]]] [[オブジェクト]]も破棄することとなります。
[141] [[プロトコル]]の詳細や [[API]] は、次の各項を参照してください。
[FIG(short list)[
- [[WebSocketエンドポイント]]
-- [[WebSocketクライアント]]
-- [[WebScoketエンドポイント]]
- [CODE(URI)@en[[[ws:]]]]
- [CODE(URI)@en[[[wss:]]]]
- [[WebSocket接続]]
- [[WebSocket handshake]]
- [[WebSocket closing handshake]]
- [[部分プロトコル]]
- [[WebSocket拡張]]
- [[WebSocketフレーム]]
-- [[[CODE(HTTP)[Close]]フレーム]]
-- [[[CODE(HTTP)[Ping]]フレーム]]
-- [[[CODE(HTTP)[Pong]]フレーム]]
-- [[データフレーム]]
- [[WebSocketメッセージ送信]]
- [[WebSocketメッセージ受信]]
- [[WebSocket状態符号]]
- [CODE(DOMi)@en[[[WebSocket]]]] [[インターフェイス]]
- [CODE(DOMi)@en[[[CloseEvent]]]] [[インターフェイス]]
- [[WebSocketタスク源]]
]FIG]
[121] [[WebSocket Protocol]] がデータを[RUBYB[送信]@en[send]]する時、
実際にはデータをバッファリングするなどして遅延させても構いません [SRC[>>120]]。
[124] [[TLS]] を実装しなければ[['''なりません''']] [SRC[>>123]]。
通信時に [[TLS]] を使う[['''べきです''']] [SRC[>>123]]。
[[強いTLSアルゴリズム]]のみ使うべきです [SRC[>>123]]。
;; [151] 実際には [[TLS]] を実装しない[[サーバー]]も存在しています。また
[[Webブラウザー]]以外の[[クライアント]]には、 [[TLS]] を実装しないものもあるかもしれません。
しかし現在では [[TLS]] を使わない[[平文]]の通信は安全でなく、
避けるべきであると考えられています。
* URL
[98] [[TLS]] の有無により、次の2つの [[URL scheme]] が定義されています。
[FIG(list)[
- [72] [CODE(URI)@en[[[ws:]]]] - [[WebSocket]] over [[TCP]]
- [73] [CODE(URI)@en[[[wss:]]]] - [[WebSocket]] over [[TLS]] over [[TCP]]
]FIG]
* [CODE(DOMi)@en[WebSocket]] インターフェイス
[132] [DFN[[CODE(DOMi)@en[[[WebSocket]]]]]] [[インターフェイス]]は、
[[WebSocket接続]]に関する機能を提供する[[WebSocketクライアント]] [[API]] です。
[133] [CODE(DOMi)@en[[[WebSocket]]]] [[インターフェイス]]は、
[[文書環境]]と[[ワーカー環境]]に[[晒されて]]います [SRC[>>131]]。
[134] [CODE(DOMi)@en[[[WebSocket]]]] [[インターフェイス]]は、
[CODE(DOMi)@en[[[EventTarget]]]] [[インターフェイス]]を[[継承]]しています [SRC[>>131]]。
[135] 次のメンバーがあります。
[FIG(list short)[
- [[[CODE(DOMi)@en[WebSocket]]コンストラクター]]
- [CODE(DOMa)@en[url][url (WebSocket)]]
- [CODE(DOMc)@en[[[CONNECTING]]]]
- [CODE(DOMc)@en[[[OPEN]]]]
- [CODE(DOMc)@en[[[CLOSING]]]]
- [CODE(DOMc)@en[[[CLOSED]]]]
- [CODE(DOMa)@en[[[readyState]]]]
- [CODE(DOMa)@en[[[bufferedAmount]]]]
- [CODE(DOMa)@en[[[onopen]]]]
- [CODE(DOMa)@en[[[onerror]]]]
- [CODE(DOMa)@en[[[onclose]]]]
- [CODE(DOMa)@en[[[extensions]]]]
- [CODE(DOMa)@en[[[protocol]]]]
- [CODE(DOMm)@en[close][close (WebSocket)]]
- [CODE(DOMa)@en[[[onmessage]]]]
- [CODE(DOMa)@en[[[binaryType]]]]
- [CODE(DOMm)@en[[[send]]]]
]FIG]
[137] [CODE(DOMi)@en[[[WebSocket]]]] [[オブジェクト]]は、
[[WebSocket接続]]を表しています。
[CODE(DOMi)@en[[[WebSocket]]]] [[オブジェクト]]が持つ状態は、
[[WebSocket接続]]を参照。
* HTTP との関係
[HISTORY[
[94] 元々 [[WHATWG]] で開発されていた頃は、 [[HTTP]] からの切り替えにも対応している、
[[HTTP]] とは別の[[プロトコル]]という位置付けでした。
[95] しかし [[IETF]] で[[プロトコル]]に変更が加えられた結果、
[[HTTP]] の動作モードのような形となっています。 ([[Web Sockets]]
から [[HTTP]] への切り替えができないのは変わっていません。)
]HISTORY]
[118] 公式には、 [[WebSocket]] は独立した [[TCP]] 上のプロトコル [SRC[>>117]]
とされています。しかし [[WebSocket handshake]] は、完全に [[HTTP要求]]と
[[HTTP応答]]のやり取りであるとされています。少なくても接続の確立に必要な程度には、
[[サーバー]]も[[クライアント]]も [[HTTP]] を実装しなければなりません。
[[クライアント]]はエラーその他の [[WebSocket]] 以外の
[[HTTP応答]]も受信できる必要があります。
[152] [[Webブラウザー]]は新しい[[接続]]で[[WebSocket接続の確立]]を開始しますし、
[[RFC]] の規定する [[WebSocket接続の確立]]の手続きに従うと、必ず新しい[[接続]]を使って
[[WebSocket]] が開始されることになります。しかし [[HTTP]] の仕様上は、
[[持続的接続]]の途中から [[WebSocket]] を開始することもできなくはありません。
[[WebSocket]] プロトコル側はこれに特に言及しておらず、[[サーバー]]がどう扱うべきかは定かではありません。
[HISTORY[
[119] 以前は独立したプロトコルとして [[NPN]] の識別子が規定されていましたが、
[[IETF]] に移管されてから [[ALPN]] の識別子は割り当てられていないようです。
]HISTORY]
[126] [[HTTP]] [CODE(HTTP)@en[[[Upgrade:]]]] の値 [DFN[[CODE(HTTP)@en[[[WebSocket]]]]]]
は、 [[WebSocket Protocol]] を表します [SRC[>>125]]。
その他[[WebSocket接続の確立]]で使われる各[[ヘッダー]]は、 [[HTTPヘッダー]]として
[[IANA登録簿]]に登録されています。
[HISTORY[
[146] [[Webブラウザー]]では、 [[HTTP]] とは性質がかなり違いますから、
[[仕様書]]上は [[Fetch]] とは別に扱われていました。しかし実装は共通化されていたようですし、
[[仕様書]]上も様々な共通の新機能が追加されたことから、 [[Fetch]]
に統合されました。
]HISTORY]
[148] [CODE(HTTP)@en[[[Upgrade:]]]] を使うことおよび [[WebSocket handshake]] の仕様から、
[[HTTP/1.1]] でしか使えません。 [[HTTP/0.9]] や [[HTTP/1.0]] や [[HTTP/2]] とは併用できません。
** HTTP/2 との関係
[169] [[WebSocket]] は [[HTTP/2]] で使うことはできません。
[153] [[ALPN]] がありますから、 [[HTTP/2]] と [[WebSocket]]
の両方に対応した[[サーバー]]と[[クライアント]]は、
[[WebSocket]] を使うときだけ [[HTTP/1.1]] を選択し、それ以外は [[HTTP/2]]
を選択するように自動的に折衝できます。
[170] [[WebSocket]] を [[HTTP/2]] に移植するよりは、 [[Fetch API]]
を拡張して [[HTTP/2]] で直接 [[WS]] 相当の機能を実現する方式が有望と見られています。
* Socket API との関係
[112] [[WebSocket]] という名前は [[Socket]] API から派生したものですが、
[[API]] も[[プロトコル]]も互換性はまったくありません。
;; [113] [[Web]] ではセキュリティー上の理由から生の [[TCP]] や [[UDP]]
へのアクセスは提供されていません。
それにかわるものとして [[WebSocket]] が開発されました。
* 利用例
[167] [[WebSocket]] を使った[[サーバー]]の実例:
[FIG(list)[
- [CITE@en[Real Time Messaging API | Slack]] ([[Slack]]著, [TIME[2016-08-19 15:33:53 +09:00]]) <https://api.slack.com/rtm>
- [CITE[GDAX | API Reference]] ([TIME[2016-08-11 04:02:30 +09:00]]) <https://docs.gdax.com/#websocket-feed>
- [CITE[Bitfinex API Reference]] ([TIME[2016-05-12 07:24:33 +09:00]]) <http://docs.bitfinex.com/#websocket>
- [CITE@ja[Kadecot » API]] ([TIME[2016-08-19 15:54:26 +09:00]]) <http://kadecot.net/webapi/>
- [CITE[uKadecot – Contributed Software]] ([TIME[2016-08-19 15:55:08 +09:00]]) <https://dev.toppers.jp/trac_user/contrib/wiki/uKadecot>
]FIG]
[168] [[WebSocket]] を[[下位層]]に使った[[プロトコル]]の例:
[FIG(short list)[
- [[STOMP]]
]FIG]
* 関連
[147] [[fetch]] は [[Service Worker]] を経由しますが、 [[WebSocket]]
は現在そのようなことはないようです。
* 歴史
** WHATWG
[142] [[WebSocket]] は [[Ian Hickson]] により [[WHATWG]] [[HTML5]] (現 [[HTML Standard]])
の機能として開発されました。
[143] 後に [[API]] は [[W3C]] [[WebApps WG]]、[[プロトコル]]は [[IETF]]
[[hybi]] [[WG]] でも同時出版されるようになりました。
[1]
[CITE['''['''whatwg''']''' Web Sockets]] ([TIME[2009-02-26 03:21:56 +09:00]] 版) <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-July/015252.html>
[TIME[2008-07-06 09:18:46 +09:00]] <http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/14577>
[2] [CITE@en-US-x-Hixie[The Web Sockets API]] ([TIME[2009-01-09 18:33:53 +09:00]] 版) <http://dev.w3.org/cvsweb/~checkout~/html5/websockets/Overview.html?content-type=text/html;%20charset=iso-8859-1>
[3] [CITE@en-US-x-Hixie[The Web Sockets API]] ([TIME[2009-04-23 13:57:02 +09:00]] 版) <http://www.w3.org/TR/2009/WD-websockets-20090423/>
[4] [CITE[Bug 27490 – Web Sockets Test Infrastructure Part 1/3: Server]]
([TIME[2009-09-27 20:51:10 +09:00]] 版)
<https://bugs.webkit.org/show_bug.cgi?id=27490>
[5] [CITE[IRC logs: freenode / #whatwg / 20090807]]
([TIME[2009-10-06 00:19:08 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090807#l-499>
[6] [CITE[IRC logs: freenode / #whatwg / 20090812]]
([TIME[2009-10-10 21:23:35 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090812>
[43] [CITE[WebSocket feedback]] ([[Ian Hickson <ian@...>]] 著, [TIME[2008-11-17 11:45:25 +09:00]] 版) <http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16588>
[44] [CITE[InfoQ: HTML 5 Web Sockets vs. Comet and Ajax]] ([[alex'''['''at''']'''c4media[dot]com]] 著, [TIME[2008-12-25 22:49:32 +09:00]] 版) <http://www.infoq.com/jp/news/2008/12/websockets-vs-comet-ajax>
[45] [CITE[Index of /specs/web-apps/current-work/.ietf-websocket-protocol]] ([TIME[2009-01-12 19:39:17 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/.ietf-websocket-protocol/>
[46] [CITE@en-US-x-Hixie[The Web Sockets API]] ([TIME[2009-01-12 12:30:06 +09:00]] 版) <http://dev.w3.org/html5/websockets/>
[47] [CITE@en[draft-hixie-thewebsocketprotocol - The Web Socket protocol]]
<http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol>
[48] [CITE[IRC logs: freenode / #whatwg / 20090603]]
([TIME[2009-08-23 21:11:50 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090603#l-515>
[49] [CITE['''['''whatwg''']''' New mailing list hybi at ietf.org for discussion of WebSocket (et al)]]
([TIME[2009-08-24 07:48:30 +09:00]] 版)
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/019090.html>
[50] [CITE['''['''hybi''']''' WebSockets]]
([TIME[2009-03-31 10:50:03 +09:00]] 版)
<http://www.ietf.org/mail-archive/web/hybi/current/msg00007.html>
[51] [CITE[Re: '''['''hybi''']''' WebSockets feedback (Was: Bayeux / Jetty perspective.)]]
([TIME[2009-04-07 10:10:01 +09:00]] 版)
<http://www.ietf.org/mail-archive/web/hybi/current/msg00055.html>
[52] [CITE['''['''hybi''']''' WebSocket feedback]]
([TIME[2009-05-05 03:10:01 +09:00]] 版)
<http://www.ietf.org/mail-archive/web/hybi/current/msg00239.html>
[53] [CITE[Re: '''['''hybi''']''' '''['''Uri-review''']''' ws: and wss: schemes]]
([TIME[2009-08-15 09:10:03 +09:00]] 版)
<http://www.ietf.org/mail-archive/web/hybi/current/msg00473.html>
[54] [CITE[IRC logs: freenode / #whatwg / 20090603]]
([TIME[2009-08-23 21:11:50 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090603#l-554>
[55] [CITE@en[(X)HTML5 Tracking]]
([TIME[2009-09-02 22:33:38 +09:00]] 版)
<http://html5.org/tools/web-apps-tracker?from=3724&to=3725>
[56] [CITE[IRC logs: freenode / #whatwg / 20090713]]
([TIME[2009-09-19 01:26:12 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090713#l-538>
[57] [CITE[IRC logs: freenode / #whatwg / 20090714]]
([TIME[2009-09-19 17:07:55 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090714#l-315>
[58] [CITE@en[gimite's web-socket-js at master - GitHub]]
([TIME[2009-10-18 18:23:12 +09:00]] 版)
<http://github.com/gimite/web-socket-js>
[59] [CITE@en[gimite's web-socket-ruby at master - GitHub]]
([TIME[2009-10-18 18:24:07 +09:00]] 版)
<http://github.com/gimite/web-socket-ruby>
[60] [CITE@en-US-x-Hixie[The Web Sockets API]]
([TIME[2009-10-29 03:44:26 +09:00]] 版)
<http://www.w3.org/TR/2009/WD-websockets-20091029/>
[61] <http://www.whatwg.org/specs/web-socket-protocol/>
[62] [CITE@en[HTML5 Revision Tracker]]
([TIME[2010-03-02 22:30:24 +09:00]] 版)
<http://html5.org/tools/web-apps-tracker?from=4813&to=4814>
[63] [CITE@en-US[WebSockets in Firefox ✩ Mozilla Hacks – the Web developer blog]]
([TIME[2010-06-02 07:33:38 +09:00]] 版)
<http://hacks.mozilla.org/2010/04/websockets-in-firefox/>
[64] [CITE@en[Web Applications 1.0 r5173 Make WebSockets support subprotocol negotiation.]] ([TIME[2010-07-21 15:47:00 +09:00]] 版) <https://html5.org/r/5173>
[7] [CITE@en-US-x-Hixie[The Web Sockets API]]
([TIME[2009-12-18 02:03:50 +09:00]] 版)
<http://www.w3.org/TR/2009/WD-websockets-20091222/>
[8] [CITE@en[typester's anyevent-websocket-demo at master - GitHub]]
([TIME[2010-01-30 22:16:41 +09:00]] 版)
<http://github.com/typester/anyevent-websocket-demo>
[9] [CITE[IRC logs: freenode / #whatwg / 20100215]]
([TIME[2010-02-19 08:10:13 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100215#l-801>
[10] [CITE[IRC logs: freenode / #whatwg / 20100503]]
([TIME[2010-05-31 06:35:58 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100503#l-206>
[11] [CITE['''['''hybi''']''' draft-ietf-hybi-thewebsocketprotocol-00]]
([TIME[2010-06-04 14:30:12 +09:00]] 版)
<http://www.ietf.org/mail-archive/web/hybi/current/msg02090.html>
[12] [CITE@en[draft-ietf-hybi-websocket-requirements-00 - HyBi WebSocket Requirements and Features]]
([TIME[2010-05-11 00:06:29 +09:00]] 版)
<http://tools.ietf.org/html/draft-ietf-hybi-websocket-requirements-00>
[13] [CITE[IRC logs: freenode / #whatwg / 20100621]]
([TIME[2010-06-28 23:03:39 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100621#l-163>
[14] [CITE[IRC logs: freenode / #whatwg / 20100707]]
([TIME[2010-07-19 19:10:52 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100707>
[15] [CITE['''['''whatwg''']''' WebSockets feedback]]
([TIME[2010-07-23 08:27:24 +09:00]] 版)
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-July/027245.html>
[16] [CITE[IRC logs: freenode / #whatwg / 20100725]]
([TIME[2010-08-10 23:54:14 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100725>
[17] [CITE[IRC logs: freenode / #whatwg / 20100806]]
([TIME[2010-08-13 08:24:27 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100806>
** IETF HyBi WG
[24] [[WHATWG]] で一旦安定したかに見えた [[WebSocket Protocol]] でしたが、
2010年9月には完全に [[IETF]] に移管され、 [[WHATWG]] [[HTML5]]
からは削除されました。
[144] これ以後 [[WebSocket Protocol]] は [[HTTP]] や他の [[RFC]]
のスタイルに合わせる形でプロトコル、仕様書共に大きく改変されることになります。
[18] [CITE@en[Web Applications 1.0 r5409 Transferred the Web Sockets Protocol to Ian Fette.]]
( ([TIME[2010-09-02 19:00:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5408&to=5409>
[19] [CITE@en[draft-ietf-hybi-thewebsocketprotocol - The WebSocket protocol]]
( ([TIME[2010-09-02 09:08:15 +09:00]] 版))
<http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol>
[20] [CITE[IRC logs: freenode / #whatwg / 20100902]]
( ([TIME[2010-09-20 22:31:00 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20100902>
[21] [CITE[IRC logs: freenode / #whatwg / 20100915]]
( ([TIME[2010-09-28 00:57:22 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20100915#l-420>
[22] [CITE[Re: ''''''[''''''hybi'''''']'''''' Versioning is a anti-pattern]]
( ([TIME[2010-09-04 00:30:41 +09:00]] 版))
<http://www.ietf.org/mail-archive/web/hybi/current/msg04029.html>
[23] [CITE[Re: ''''''[''''''hybi'''''']'''''' I-D Action:draft-ietf-hybi-thewebsocketprotocol-01.txt]]
( ([TIME[2010-09-04 00:30:44 +09:00]] 版))
<http://www.ietf.org/mail-archive/web/hybi/current/msg03944.html>
[65] [CITE[IRC logs: freenode / #whatwg / 20100920]]
( ([TIME[2010-10-06 23:49:38 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20100920#l-529>
[66] [CITE@en-US[WebSocket disabled in Firefox 4 ✩ Mozilla Hacks – the Web developer blog]]
( ([TIME[2010-12-22 23:57:21 +09:00]] 版))
<http://hacks.mozilla.org/2010/12/websockets-disabled-in-firefox-4/>
[67] [CITE[''''''[''''''hybi'''''']'''''' Experiment comparing Upgrade and CONNECT handshakes]]
( ([TIME[2010-12-04 09:50:08 +09:00]] 版))
<http://www.ietf.org/mail-archive/web/hybi/current/msg04744.html>
[68] [CITE[Disabling the WebSocket protocol — Anne’s Blog]]
( ([TIME[2010-12-22 23:57:58 +09:00]] 版))
<http://annevankesteren.nl/2010/12/websocket-protocol-vulnerability>
[69] [CITE@en[Web Applications 1.0 r5963 12102]]
( ([TIME[2011-03-25 08:59:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5962&to=5963>
[25] [CITE[IRC logs: freenode / #whatwg / 20100923]]
( ([TIME[2010-10-08 09:01:09 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20100923>
[26] [CITE[IRC logs: freenode / #whatwg / 20101005]]
( ([TIME[2010-10-16 08:48:35 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101005#l-406>
[27] [CITE[IRC logs: freenode / #whatwg / 20101006]]
( ([TIME[2010-10-21 08:34:18 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101006>
[28] [CITE[IRC logs: freenode / #whatwg / 20101010]]
( ([TIME[2010-10-22 23:35:52 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101010>
[29] [CITE@ja[Opera Desktop Team - Web Sockets enter the Opera House]]
( ([TIME[2010-10-23 00:19:44 +09:00]] 版))
<http://my.opera.com/desktopteam/blog/2010/10/11/websockets>
[30] [CITE@ja[Opera Core Concerns - WebSockets in Opera]]
( ([TIME[2010-10-23 00:20:52 +09:00]] 版))
<http://my.opera.com/core/blog/websockets>
[31] [CITE[IRC logs: freenode / #whatwg / 20101012]]
( ([TIME[2010-10-23 00:20:11 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101012>
[32] [CITE[Opera's WebSockets testsuite]]
( ([TIME[2010-10-11 18:24:00 +09:00]] 版))
<http://testsuites.opera.com/websockets/>
[33] [CITE[IRC logs: freenode / #whatwg / 20101018]]
( ([TIME[2010-10-26 00:35:01 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101018>
[34] [CITE[IRC logs: freenode / #whatwg / 20101029]]
( ([TIME[2010-11-08 23:38:21 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101029>
[35] [CITE[IRC logs: freenode / #whatwg / 20101209]]
( ([TIME[2011-01-02 19:54:41 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101209>
[36] [CITE[IRC logs: freenode / #whatwg / 20110125]]
( ([TIME[2011-03-05 23:17:17 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110125#l-536>
[37] [CITE[IRC logs: freenode / #whatwg / 20110325]]
( ([TIME[2011-04-10 19:16:01 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110325#l-171>
[38] [CITE@en-US-x-Hixie[The WebSocket API]]
( ([TIME[2011-04-18 23:06:39 +09:00]] 版))
<http://www.w3.org/TR/2011/WD-websockets-20110419/>
[39] [CITE[IRC logs: freenode / #whatwg / 20110516]]
( ([TIME[2011-05-19 08:35:33 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110516>
[40] [CITE[IRC logs: freenode / #whatwg / 20110520]]
( ([TIME[2011-05-22 19:41:16 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110520>
[41] [CITE[''''''[''''''whatwg'''''']'''''' WebSockets API feedback]]
( ([TIME[2011-05-25 08:37:01 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/031792.html>
[42] [CITE@en[Web Applications 1.0 r6151 WebSockets: binary data (first draft)]]
( ([TIME[2011-05-27 08:47:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6150&to=6151>
[71] 最初は [[HTTP]] [[鯖]]みたいな複雑なことをせずとも簡単に実装できるのが売りだったのに、
こんなわけのわからぬことになってしまったんだ・・・。 [TIME[2011-06-05T03:53:28.00Z]]
[74] [CITE@en[Web Applications 1.0 r6330 WebSocket: Disallow this controversial extension rather than require it.]]
( ([TIME[2011-07-28 05:37:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6329&to=6330>
[75] [CITE@en[New tests submitted by Microsoft for WebApps specs]]
( ([[Adrian Bateman]] 著, [TIME[2011-09-14 10:26:30 +09:00]] 版))
<http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1406.html>
[76] [CITE@en-US-x-Hixie[The WebSocket API]]
( ([TIME[2011-09-29 18:38:11 +09:00]] 版))
<http://www.w3.org/TR/2011/WD-websockets-20110929/>
[77] [CITE@en[Web Applications 1.0 r6632 Revert the part of r5409 that removed the URL parsing algorithms, since it's no longer defined in the protocol spec.]]
( ([TIME[2011-10-05 10:55:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6631&to=6632>
[78] [CITE[IRC logs: freenode / #whatwg / 20111013]]
( ([TIME[2011-10-17 22:06:50 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20111013#l-240>
[79] [CITE[IRC logs: freenode / #whatwg / 20111115]]
( ([TIME[2011-11-16 23:10:22 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20111115#l-987>
[80] [CITE[''''''[''''''whatwg'''''']'''''' WebSocket framing]]
( ([TIME[2011-12-09 08:13:46 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-December/034132.html>
** RFC 出版
[145] 2011年12月には、 [[WebSocket Protocol]] が [DFN[[[RFC 6455]]]]
として出版されました。
[81] [CITE@en-US-x-Hixie[The WebSocket API]]
( ([TIME[2011-12-07 01:33:53 +09:00]] 版))
<http://www.w3.org/TR/2011/CR-websockets-20111208/>
[82] [CITE[Chromium Blog: Web Sockets Now Available In Google Chrome]]
( ([TIME[2011-12-12 16:05:26 +09:00]] 版))
<http://blog.chromium.org/2009/12/web-sockets-now-available-in-google.html>
[83] [CITE@en[RFC 6455 - The WebSocket Protocol]]
( ([TIME[2011-12-12 09:12:59 +09:00]] 版))
<http://tools.ietf.org/html/rfc6455>
[84] [CITE@en[| Xtranormal]]
( ([[Xtranormal]] 著, [TIME[2012-02-29 23:32:09 +09:00]] 版))
<http://www.xtranormal.com/watch/7991991/web-sockets-we-are-the-first>
[85] [CITE[Scheme/Host/Port: RFC 6454 and RFC 6455]]
( ([TIME[2012-02-16 12:42:54 +09:00]] 版))
<http://www.schemehostport.com/2011/12/rfc-6454-and-rfc-6465.html>
[86] [CITE[IRC logs: freenode / #whatwg / 20120327]]
( ([TIME[2012-04-09 21:35:50 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120327#l-638>
[87] [CITE@en-US-x-Hixie[The WebSocket API]]
( ([TIME[2012-05-24 23:21:13 +09:00]] 版))
<http://www.w3.org/TR/2012/WD-websockets-20120524/>
[88] [CITE@en-US-x-Hixie[The WebSocket API]]
( ([TIME[2012-08-08 03:19:30 +09:00]] 版))
<http://www.w3.org/TR/2012/WD-websockets-20120809/>
[89] [CITE@en-US-x-Hixie[The WebSocket API]]
( ([TIME[2012-09-19 23:57:11 +09:00]] 版))
<http://www.w3.org/TR/2012/CR-websockets-20120920/>
[90] [CITE@en[Interview with Ian Hickson, HTML editor | HTML5 Doctor]]
( ([TIME[2013-01-13 18:27:28 +09:00]] 版))
<http://html5doctor.com/interview-with-ian-hickson-html-editor/>
[91] [CITE[websockets-mixed-content]]
( ([TIME[2013-10-05 02:05:52 +09:00]] 版))
<http://nwilson.github.io/websockets-mixed-context/>
[92] [CITE[websockets-mixed-content]]
( ([TIME[2013-10-05 02:05:52 +09:00]] 版))
<http://nwilson.github.io/websockets-mixed-context/>
[93] [CITE@en[Web Applications 1.0 r8232 Make sure WebSocket connections that can't honour the subprotocol don't get established (looks like this got broken in the protocol spec at some point)]]
( ([TIME[2013-10-22 02:10:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8231&to=8232>
[99] [CITE@en[RFC 7355 - Indicating WebSocket Protocol as a Transport in the Session Initiation Protocol (SIP) Common Log Format (CLF)]]
( ([TIME[2014-09-23 21:54:48 +09:00]] 版))
<https://tools.ietf.org/html/rfc7355>
[100] [CITE@en[RFC 7118 - The WebSocket Protocol as a Transport for the Session Initiation Protocol (SIP)]]
( ([TIME[2014-09-11 11:03:12 +09:00]] 版))
<https://tools.ietf.org/html/rfc7118>
[101] [CITE[iOSとHTML5とWebSocketと画面ロックと - Qiita]]
( ([TIME[2014-11-13 06:35:28 +09:00]] 版))
<http://qiita.com/tomoyukilabs/items/3dd71b07778e0963ec67>
[REFS[
- [102] [CITE[UPnP Device Architecture 2.0]] ([TIME[2014-09-05 02:24:48 +09:00]] 版) <http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0.pdf#page=194>
]REFS]
[103] >>102 は [[UCA]] over [[Web Sockets]] を紹介しています (が詳しい規定はありません)。
[104] [CITE@en[RFC 7118 - The WebSocket Protocol as a Transport for the Session Initiation Protocol (SIP)]]
( ([TIME[2014-12-14 15:19:16 +09:00]] 版))
<http://tools.ietf.org/html/rfc7118>
[105] [CITE@en[RFC 7395 - An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket]]
( ([TIME[2014-10-31 10:01:54 +09:00]] 版))
<https://tools.ietf.org/html/rfc7395>
[107] [CITE@en[MIX: Stop throwing exceptions for WebSockets. · f2730ad · w3c/webappsec]]
( ([TIME[2015-01-15 11:45:15 +09:00]] 版))
<https://github.com/w3c/webappsec/commit/f2730ad4e5125a574bc885883542e57da99cc6c3>
[108] [CITE@en[RFC 7355 - Indicating WebSocket Protocol as a Transport in the Session Initiation Protocol (SIP) Common Log Format (CLF)]]
( ([TIME[2014-12-28 22:53:32 +09:00]] 版))
<https://tools.ietf.org/html/rfc7355>
[109] [CITE[''''''[''''''hybi'''''']'''''' Informal survey: "Non Request-Response Communication over the Web, and What's Missing"]]
([TIME[2015-01-16 21:50:06 +09:00]] 版)
<http://www.ietf.org/mail-archive/web/hybi/current/msg10580.html>
[110] [CITE@en[mod_proxy_wstunnel - Apache HTTP Server Version 2.4]]
([TIME[2015-01-02 00:30:56 +09:00]] 版)
<http://httpd.apache.org/docs/current/en/mod/mod_proxy_wstunnel.html>
[111] [CITE[Still looking for alternatives to CORS and WebSocket — Anne’s Blog]]
([TIME[2015-03-21 15:13:43 +09:00]] 版)
<https://annevankesteren.nl/2015/03/public-internet-proxy>
[114] [CITE[WebSocket Layering over SPDY ''''''[''''''public draft'''''']'''''' - Google Docs]]
([TIME[2015-05-17 00:15:26 +09:00]] 版)
<https://docs.google.com/document/d/1zUEFzz7NCls3Yms8hXxY4wGXJ3EEvoZc3GihrqPQcM0/edit?pli=1>
[128] [CITE@en[draft-hirano-httpbis-websocket-over-http2-01 - WebSocket over HTTP/2]]
([TIME[2015-04-24 04:11:46 +09:00]] 版)
<http://tools.ietf.org/html/draft-hirano-httpbis-websocket-over-http2-01>
[129] [CITE@en[draft-ietf-hybi-websocket-requirements-02 - HyBi WebSocket Requirements and Features]]
([TIME[2015-04-24 04:46:34 +09:00]] 版)
<https://tools.ietf.org/html/draft-ietf-hybi-websocket-requirements-02>
[130] [CITE@en[draft-ibc-websocket-dns-srv-02 - DNS SRV Resource Records for the WebSocket Protocol]]
([TIME[2015-04-24 04:45:19 +09:00]] 版)
<https://tools.ietf.org/html/draft-ibc-websocket-dns-srv-02>
[149] [CITE@en[Where to file RFC 6455 bugs? ''''''[''''''Was: Re: CfC: Mixed Content to PR; deadline July 6th.'''''']'''''']]
([[Arthur Barstow]] 著, [TIME[2015-06-23 04:05:27 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-webappsec/2015Jun/0061.html>
[150] [CITE@en[w3c/websockets]]
([TIME[2015-06-25 16:03:18 +09:00]] 版)
<https://github.com/w3c/websockets/>
[154] [CITE@en[PSA: Change the Latest Editor's Drafts of WebStorage, WebWorkers, WebMessaging, Server-Sent Events and WebSockets]]
([[Xiaoqian Wu]] 著, [TIME[2015-10-20 02:52:22 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-webapps/2015OctDec/0099.html>
[FIG(quote)[
[FIGCAPTION[
[155] [CITE[The WebSocket API]]
([TIME[2015-12-16 02:08:48 +09:00]] 版)
<https://w3c.github.io/websockets/>
]FIGCAPTION]
> No one in the Web Platform Working Group is actively working on this specification. For the latest version of The WebSocket API use the WHATWG Living Standard.
]FIG]
[156] [CITE@en[URLs are parsed and produce records · whatwg/html@30bc255]]
([TIME[2016-02-14 23:05:42 +09:00]] 版)
<https://github.com/whatwg/html/commit/30bc2557105ad62881ec9670f253febbc9761b44>
[157] [CITE@en[28841 – Incorporate changes suggested by Mixed Content]]
([TIME[2016-02-27 11:48:49 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=28841>
[158] [CITE@en[Update WebSocket construction per mixed content by domenic · Pull Request #222 · whatwg/html]]
([TIME[2016-02-27 11:48:57 +09:00]] 版)
<https://github.com/whatwg/html/pull/222>
[159] [CITE@en[WebSocket: upgrade-insecure-requests · Issue #180 · whatwg/html]]
([TIME[2016-02-27 11:51:05 +09:00]] 版)
<https://github.com/whatwg/html/issues/180>
** Fetch Standard
[162] 2016年3月には、接続の確立に関する部分がプロトコルと API から分離されて
[[Fetch Standard]] に統合されました。これによって [[Mixed Content]]
や [[HSTS]] などとの関係も明確化されました。
;; [[Fetch Standard]] の歴史の項を参照。
* メモ
[FIG(amazon)[
[[WebSocket]]
]FIG]
[70] [[Web Sockets]] は、元々は [[Web]] のための [[Socket]] [[API]]
とそれを支える[[プロトコル]]として [[WHATWG]] で開発されていましたが、
後に[[プロトコル]]部分が [[IETF]] に移管され、用途が不明瞭になりつつある仕様です。
[122] [[IETF]] に移った後、[[RFC 2119]] [[助動詞]]の扱いが若干曖昧になったり、
[[変数]]を使ったり使わなかったり、冗長な説明を繰り返したり、
[[アルゴリズム]]の一部であるべきものが他の節で規定されたりなど、
仕様書としての品質は下がり気味のようです。
[136] [CITE@en-US[Writing WebSocket servers - WebSockets | MDN]]
([TIME[2015-03-07 20:59:19 +09:00]] 版)
<https://developer.mozilla.org/en-US/docs/WebSockets/Writing_WebSocket_servers>
[163] [CITE@en-US[Archive]]
([TIME[2016-03-14 19:53:58 +09:00]] 版)
<https://mailarchive.ietf.org/arch/msg/hybi/2OIyLSs5JjDfiFB_I_HGoSinsqc>
[164] [CITE@en[Editorial: remove HSTS reference · whatwg/html@96be6c0]]
([TIME[2016-03-16 14:16:07 +09:00]] 版)
<https://github.com/whatwg/html/commit/96be6c02315d677c48ac334a689a48cbd1929c95>
[165] [CITE@en[23992 – WebSocket: API to apply TCP backpressure]]
([TIME[2016-03-17 16:49:22 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=23992>
[166] [CITE@en[Update WebSocket to use Fetch's WebSocket alterations · whatwg/html@3dadbca]]
([TIME[2016-03-28 22:54:32 +09:00]] 版)
<https://github.com/whatwg/html/commit/3dadbcad063a10b586ef52dd4b427aa339048ee7>
[FIG(quote)[
[FIGCAPTION[
[171] [CITE@ja[ストリーミング | Typetalk API | Nulab Developers]]
( ([TIME[2017-03-18 13:38:16 +09:00]]))
<https://developer.nulab-inc.com/ja/docs/typetalk/api/1/streaming>
]FIGCAPTION]
> Streaming API はリアルタイムにデータを取得するためのもので、利用するには WebSocket プロトコルを使う必要があります。
]FIG]
[172] [CITE@en[The WebSocket constructor does not throw SecurityError on bad port anymore · Issue #2460 · whatwg/html]]
([TIME[2017-03-30 14:29:23 +09:00]])
<https://github.com/whatwg/html/issues/2460>
[FIG(quote)[
[FIGCAPTION[
[173] [CITE@en[Qlik Engine API ‒ Qlik Sense]]
([TIME[2017-05-25 23:15:22 +09:00]])
<http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/introducing-engine-API.htm>
]FIGCAPTION]
> The Qlik Engine API is a WebSocket protocol that uses JSON to pass information between the Qlik Sense engine and the clients.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[174] [CITE[Mattermost API Reference]]
([TIME[2016-12-07 08:34:06 +09:00]])
<https://api.mattermost.com/#tag/WebSocket>
]FIGCAPTION]
> The Mattermost WebSocket can be authenticated by cookie or through an authentication challenge. If you're authenticating from a browser and have logged in with the Mattermost API, your authentication cookie should already be set, this is how the Mattermost webapp authenticates with the WebSocket.
> To authenticate with an authentication challenge, first connect the WebSocket and then send the following JSON over the connection:
]FIG]
[FIG(quote)[
[FIGCAPTION[
[175] [CITE[取引所APIドキュメント | Coincheck(コインチェック)]]
([TIME[2017-06-22 11:11:57 +09:00]])
<https://coincheck.com/ja/documents/exchange/api>
]FIGCAPTION]
> WebSocket 接続先
> wss://ws-api.coincheck.com/
> Subscribe
> メッセージの受信を開始するには、まずSubscribeを示すリクエストをサーバーに送信する必要があります。このリクエストはJSONエンコードされている必要があります。
]FIG]