From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/websocket/readystate/index.html | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 files/ja/web/api/websocket/readystate/index.html (limited to 'files/ja/web/api/websocket/readystate/index.html') diff --git a/files/ja/web/api/websocket/readystate/index.html b/files/ja/web/api/websocket/readystate/index.html new file mode 100644 index 0000000000..82f6db18e9 --- /dev/null +++ b/files/ja/web/api/websocket/readystate/index.html @@ -0,0 +1,79 @@ +--- +title: WebSocket.readyState +slug: Web/API/WebSocket/readyState +translation_of: Web/API/WebSocket/readyState +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket.readyState は、{{domxref("WebSocket")}} の「現在」の接続状態を返す読み取り専用のプロパティです。

+ +

構文

+ +
var readyState = aWebSocket.readyState;
+ +

+ +

以下のいづれかの 符号なしショート型 の値を返します。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueStateDescription
0CONNECTING +

ソケットは作成されているが、まだコネクションが開いていない状態

+
1OPEN +

コネクションが開き、通信の準備ができている状態

+
2CLOSING +

コネクションが閉じる過程にある状態

+
3CLOSED +

コネクションが閉じられたか、もしくは開けていなかった状態

+
+ +

仕様書

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-websocket-readystate', 'WebSocket: readyState')}}{{Spec2('HTML WHATWG')}}Initial definition
+ +

ブラウザの互換性

+ + + +

{{Compat("api.WebSocket.readyState")}}

-- cgit v1.2.3-54-g00ecf