ControlMessageHandler class

ControlMessageHandler - 控制消息处理实现 使用 requestId + apiUrl 作为缓存 key

Implemented types

Constructors

ControlMessageHandler(WebrtcConnection? connection)

Properties

cachedCallbackCount int
获取当前缓存的回调数量
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearAllCallbacks() → void
清除所有缓存的回调(用于连接断开等场景)
handleRawMessage(Uint8List bytes) → void
处理从 DataChannel 接收到的原始字节数据 此方法应该在 DataChannelObserver.onMessage 中调用
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
receiveMessage(WebRtcHttpMessage message) → void
接收到控制消息(由 DataChannelObserver 调用) message 接收到的消息
override
release() → void
释放资源,防止内存泄漏
sendMessage(WebRtcHttpMessage message, OnReceiveMessageCallback? callback) → void
发送控制消息 message 要发送的消息 callback 接收响应的回调
override
setConnection(WebrtcConnection? connection) → void
设置连接
toString() String
A string representation of this object.
inherited

Operators

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