WebSocket class abstract

WebSocket

Constructors

WebSocket.connect(String url, {List<String>? protocols, Map<String, String>? headers})
Connect to the url.
factory

Properties

binaryType String?
binaryType
getter/setter pair
extensions String?
extensions
no setter
hashCode int
The hash code for this object.
no setterinherited
onclose ↔ (void Function(int? code, String? reason)?)
onclose
getter/setter pair
ondata ↔ (void Function(Object? data)?)
ondata
getter/setter pair
onerror ↔ (void Function(Object? error)?)
onerror
getter/setter pair
onopen ↔ (void Function()?)
onopen
getter/setter pair
protocol String?
protocol
no setter
readyState int
readyState
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
url
no setter

Methods

close([int? code, String? reason]) → void
Close the WebSocket with code and reason.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(Object data) → void
Send data to the remote.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

closed → const int
CLOSED = 3
closing → const int
CLOSING = 2
connecting → const int
CONNECTING = 0
open → const int
OPEN = 1