WebSocket()
WebSocket()
생성자는 새로운 WebSocket
객체를 반환합니다.
구문
js
new WebSocket(url);
new WebSocket(url, protocols);
매개변수
예외
SyntaxError
DOMException
(en-US)-
아래의 경우 발생합니다.
명세
Specification |
---|
WebSockets Standard # ref-for-dom-websocket-websocket① |
브라우저 호환성
BCD tables only load in the browser
같이 보기
- RFC 6455 (WebSocket Protocol 명세)