This translation is incomplete. Please help translate this article from English

WebSocket.readyState 읽기 전용 속성은 WebSocket 연결의 현재 상태를 반환한다.


var readyState = aWebSocket.readyState;


아래의 unsigned short 값들 중 하나 :

Value State Description
0 CONNECTING 소켓이 생성되었다. 연결이 아직 열려 있지 않다.
1 OPEN 연결이 열려 있고, 통신할 준비가 되었다.
2 CLOSING 연결이 닫히는 중이다.
3 CLOSED 연결이 닫혔거나 열 수 없었다.


Specification Status Comment
HTML Living Standard
The definition of 'WebSocket: readyState' in that specification.
Living Standard Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
readyStateChrome Full support YesEdge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes


Full support  
Full support
Compatibility unknown  
Compatibility unknown