EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

readyState property

Returns the state of the WebSocket connection.

This property is read-only.

Syntax

JavaScript
iReadyState = object.readyState

Property values

Type: Number

One of the following numerical values:

  • CONNECTING (0) Default
  • OPEN (1)
  • CLOSING (2)
  • CLOSED (3)

Remarks

When the WebSocket is first created, the readyState is set to CONNECTING. When the connection is established, the readyState is set to OPEN. If the connection fails, then the readyState is set to CLOSED.

See also

WebSocket
close
onclose
onopen
WebSockets in Windows
WebSockets RFC 6455
The WebSocket API

 

 

Anzeigen:
© 2014 Microsoft. Alle Rechte vorbehalten.