跳转到正文

blobs API ​

完整接口目录 · 世界与方块用法 · 工具包下载

模块说明 ​

text
Passive Blob grants and streaming reads; no cache-miss fetch or retry.

The Host verifies the game XXH64 key. BulkClient independently verifies the
transport SHA256. Sinks receive provisional bytes and must publish only after
consume_cached_blob succeeds. The caller owns and closes the shared BulkClient;
cancellation does not mean its actual IO thread has exited.

MAX_BLOB_BYTES ​

python
MAX_BLOB_BYTES = 1 << 20

cached_blob ​

python
async def cached_blob(peer, session, hash_value)

SDK 说明:

text
Request one owned descriptor; permission/cache_miss RPC errors propagate.

consume_cached_blob ​

python
async def consume_cached_blob(peer, session, hash_value, bulk, sink)

SDK 说明:

text
Stream once through a caller-owned BulkClient; return verified object ref.

No payload is retained here. BulkClient bounds actual workers and waiters;
its aclose joins actual workers. Descriptor RPC concurrency remains owned by
the caller/peer. An unused or invalid grant expires at the Host's bounded TTL.

Neomega · 使用、开发与参考文档