主题
DataChannel 继承自: ABC
Abstract widget-facing byte channel.
方法
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
on_bytes | None | — | Register a handler for bytes pushed from Dart. Pass None to clear. The handler runs synchronously on whatever thread the transport delivers from — push heavy work to a queue/worker. |
send | None | — | Send bytes Python → Dart. Fire-and-forget. |
close | None | — | Release the channel. Idempotent. |