Skip to main content
Class: SummerWorldChannel · Inherits: RefCounted An admitted participant’s private handle to a World channel. Open through Summer.client.channels. A handle stays bound to its original admission and never retargets after leave or reconnect into another World. Games own the UI. The Engine initially publishes the newest two authorized messages, ordered by sequence; explicit older history expands the window to at most sixteen. Invalidation clears that window immediately and reloads the newest two. History is best effort, not a lossless event log. Keep UI text synchronized with history_changed and treat text as plain text, not markup. A receipt proves acceptance, not incoming delivery.

Methods

get_channel_key

Returns the original channel key. Returns: String

get_messages

Returns a copy of the current authorized bounded window in ascending sequence order. Returns an empty array while invalidated or closed. Cached bodies expire at their known expiry. Returns: SummerChannelMessage[]

is_closed

Whether this handle has permanently closed. Returns: bool

is_history_loaded

Whether at least one authorized page has loaded. Check is_history_current() before displaying it. Returns: bool

is_history_current

Whether the window satisfies the latest hint and recovery generation under the current admission. Returns: bool

send_message

Sends plain Unicode text, up to 4000 characters, through the current Player Host. An ambiguous failure does not prove rejection; retry the returned operation to retain its original idempotency identity. Returns: SummerChannelSendOperation Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.

refresh

Reads the newest authorized page. Only one history read may be pending. Use this after history_failed to request recovery. Returns: SummerChannelMessagesOperation Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.

load_older

Reads the next older page at the current revision, up to the sixteen-message window bound. Older history never emits an incoming-message burst. Fails when no older cursor exists, a read is pending, the window is full, or history is dirty. Returns: SummerChannelMessagesOperation Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.

close

Idempotently closes the local subscription, clears cached bodies, and fences pending operations. Does not delete backend history or change World membership. Returns: void

Signals

message_received

A newly observed message from a subsequent newest-page refresh. Initial and explicitly requested older history are excluded. Messages are ordered within each newest-page batch; visibility changes may expose previously unseen older messages in a later batch. Delivery is deduplicated within a bounded local history; it is not exactly once across lifetimes.

history_changed

The visible history was replaced, invalidated, extended, or expired. Read get_messages() again.

history_failed

A history read failed. Authorization errors are never converted to empty history. Call refresh() to retry explicitly.

closed

This handle closed and cannot be reused. Admission teardown revokes the handle immediately and delivers this notification after teardown unwinds, allowing handlers to start a successor session safely.
What is live on the platform today: platform capability status. Check availability at runtime before you offer a feature.