EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

onopen event

Fires when a WebSocket is connected.

Syntax

Event Property object.onopen = handler;
addEventListener Method object.addEventListener("open", handler, useCapture)

Event handler parameters

handler [in]

Type: Function

Event handler to call when a WebSocket connect is made.

Remarks

This event fires only when a connection is made. To determine if a connection is still open, use readyState. If you provide a protocol when opening a WebSocket, it is recommended that the app check the protocol property to ensure the protocol was accepted by the server.

See also

WebSocket
readyState
WebSockets in Windows
WebSockets RFC 6455
The WebSocket API

 

 

표시:
© 2014 Microsoft