blob: c11bd768670068eaae287400066bbc83ec65db7f (
plain)
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
|
---
title: WebSocket.readyState
slug: Web/API/WebSocket/readyState
translation_of: Web/API/WebSocket/readyState
---
<p>{{APIRef("Web Sockets API")}}</p>
<p><strong><code>WebSocket.readyState</code></strong> 읽기 전용 속성은 {{domxref("WebSocket")}} 연결의 현재 상태를 반환한다.</p>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox">var readyState = <em>aWebSocket</em>.readyState;</pre>
<h2 id="Value">Value</h2>
<p>아래의 <code>unsigned short</code> 값들 중 하나 :</p>
<table class="standard-table">
<tbody>
<tr>
<td class="header">Value</td>
<td class="header">State</td>
<td class="header">Description</td>
</tr>
<tr>
<td><code>0</code></td>
<td><code>CONNECTING</code></td>
<td>소켓이 생성되었다. 연결이 아직 열려 있지 않다.</td>
</tr>
<tr>
<td><code>1</code></td>
<td><code>OPEN</code></td>
<td>연결이 열려 있고, 통신할 준비가 되었다.</td>
</tr>
<tr>
<td><code>2</code></td>
<td><code>CLOSING</code></td>
<td>연결이 닫히는 중이다.</td>
</tr>
<tr>
<td><code>3</code></td>
<td><code>CLOSED</code></td>
<td>연결이 닫혔거나 열 수 없었다.</td>
</tr>
</tbody>
</table>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('HTML WHATWG', '#dom-websocket-readystate', 'WebSocket: readyState')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{Compat("api.WebSocket.readyState")}}</p>
|