WebSocket.readyState
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
WebSocket.readyState
읽기 전용 속성은 WebSocket
연결의 현재 상태를 반환합니다.
값
아래의 unsigned short
값 중 하나입니다.
값 | 상태 | 설명 |
---|---|---|
0 |
CONNECTING |
소켓이 생성됐으나 연결은 아직 개방되지 않았습니다. |
1 |
OPEN |
연결이 개방되어 통신할 수 있습니다. |
2 |
CLOSING |
연결을 닫는 중입니다. |
3 |
CLOSED |
연결이 닫혔거나, 개방할 수 없었습니다. |
명세
Specification |
---|
WebSockets # ref-for-dom-websocket-readystate① |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
readyState |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.