WebSocket class
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → dynamic -
关闭 WebSocket 连接.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClose(
OnClose callback) → dynamic -
WebSocket 关闭的回调.
override
-
onFailure(
OnFailed callback) → dynamic -
建立 WebSocket 连接失败的回调.
override
-
onMessage(
OnMessage callback) → dynamic -
接收到 WebSocket 消息的回调.
override
-
onSuccess(
OnSuccess callback) → dynamic -
建立 WebSocket 连接成功的回调.
override
-
open(
String url) → dynamic -
建立 WebSocket 连接.
override
-
send(
String data) → dynamic -
发送数据.
override
-
sendUint8List(
Uint8List data) → dynamic -
override
-
state(
) → WebSocketState -
获取连接状态.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited