外观
tooldelta_packets API
完整接口目录 · 多语言与兼容桥接用法 · 工具包下载
模块说明
text
Ordered custom and JSON packets through the original synchronous handler.
The owner installs listeners before applying events and serializes apply/close.
This owns neither subscription nor threads. Player projection precedes original
dictionary callbacks. Unselected state/Text retain semantic-only handlers.OriginalPacketPump
python
class OriginalPacketPump(PlayerPump)SDK 说明:
text
One awaited mixed callback per read, with actual callback/close joining.OriginalPacketPump.__init__
python
def __init__(self, stream, epoch, apply)继承自 player_pump.PlayerPump.__init__。
OriginalPacketPump.open
python
@classmethod
async def open(cls, peer, session, *, install, apply, reader_options=None)SDK 说明:
text
Install the snapshot before starting. Callbacks must be async/cooperative.
Requires catalog poll_wait_ms support, checked here before opening a
source. install failure closes the acquired source; no reader is started.继承自 player_pump.PlayerPump.open。
OriginalPacketPump.wait
python
async def wait(self)SDK 说明:
text
Supervision hook: propagates read/apply failure; cancellation doesn't detach ownership.继承自 player_pump.PlayerPump.wait。
OriginalPacketPump.close
python
async def close(self)SDK 说明:
text
Seal new polls, join the current read/apply, then release the stream.
Cancellation of this waiter does not cancel cleanup. Await close again to
observe actual completion; no drained acknowledgement is implied earlier.
A failed read/apply remains an error even when release succeeds.继承自 player_pump.PlayerPump.close。
ToolDeltaPackets
python
class ToolDeltaPackets(ToolDeltaEvents)ToolDeltaPackets.__init__
python
def __init__(self, group, snapshot, packet_handler)ToolDeltaPackets.apply
python
def apply(self, event, *, epoch)ToolDeltaPackets.close
python
def close(self)继承自 tooldelta_events.ToolDeltaEvents.close。
make_packet_handler
python
def make_packet_handler(frame, packet_ids)SDK 说明:
text
Original synchronous dispatch with explicit subscription admission.
The domain requires an exact Host selection before opening the source.
Unselected/mismatched listeners fail explicitly. Waits are domain-owned.hook_group_packets
python
def hook_group_packets(group, handler)decode_dictionary
python
def decode_dictionary(data)SDK 说明:
text
Bounded strict JSON; retain original names, null, numbers and Base64 text.