WebSocketReadyState enum Client Entity

The IWebSocketPlatformTransport.readyState property returns the current state of the WebSocket connection.

Inheritance

Constructors

WebSocketReadyState(int code, String name, String description)
Creates a const WebSocketReadyState with the specified code, name and description.
const
WebSocketReadyState.fromCode(int code)
Creates a WebSocketReadyState from the specified code.
factory

Values

connecting → const WebSocketReadyState

Socket has been created. The connection is not yet open.

const WebSocketReadyState(0, 'CONNECTING', 'Socket has been created. The connection is not yet open.')
open → const WebSocketReadyState

The connection is open and ready to communicate.

const WebSocketReadyState(1, 'OPEN', 'The connection is open and ready to communicate.')
disconnecting → const WebSocketReadyState

The connection is in the process of closing.

const WebSocketReadyState(2, 'CLOSING', 'The connection is in the process of closing.')
closed → const WebSocketReadyState

The connection is closed or couldn't be opened.

const WebSocketReadyState(3, 'CLOSED', 'The connection is closed or couldn\'t be opened.')

Properties

code int
The value of the WebSocketReadyState constant.
final
description String
Description of the WebSocketReadyState constant.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isClosed bool
The connection is closed or couldn't be opened.
no setter
isConnecting bool
Socket has been created. The connection is not yet open.
no setter
isDisconnecting bool
The connection is in the process of closing.
no setter
isOpen bool
The connection is open and ready to communicate.
no setter
name String
Name of the WebSocketReadyState constant.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<WebSocketReadyState>
A constant List of the values in this enum, in order of their declaration.