Channel#
- class omni.kit.collaboration.channel_manager.Channel(
- handler: <module 'weakref' from '/builds/omniverse/kit/kit/_build/python/lib/python3.12/weakref.py'>,
- channel_manager: <module 'weakref' from '/builds/omniverse/kit/kit/_build/python/lib/python3.12/weakref.py'>,
Bases:
objectChannel represents the instance of a live session channel.
Methods
__init__(handler, channel_manager)Internal constructor.
add_subscriber(on_message)Add subscriber.
send_message_async(content)Async function.
stop()Attributes
The connection ID assigned to this client by the server.
[Deprecated] The logged-in user identifier for this channel.
[Deprecated] The logged-in user name for this channel.
All the peer clients that joined to this channel.
Whether channel is stopped or not.
url- __init__(
- handler: <module 'weakref' from '/builds/omniverse/kit/kit/_build/python/lib/python3.12/weakref.py'>,
- channel_manager: <module 'weakref' from '/builds/omniverse/kit/kit/_build/python/lib/python3.12/weakref.py'>,
Internal constructor.
- add_subscriber(
- on_message: Callable[[Message], None],
Add subscriber.
- Parameters:
on_message (Callable[[Message], None]) – The message handler.
- Returns:
Instance of ChannelSubscriber. The channel will be stopped if instance is release. So it needs to hold the instance before it’s stopped. You can manually call `stop` to stop this channel, or set the returned instance to None.
- async send_message_async(
- content: dict,
Async function. Send message to all peer clients.
- Parameters:
content (dict) – The message composed in dictionary.
- Returns:
omni.client.Result.
- property local_connection_id#
The connection ID assigned to this client by the server.
- property logged_user_id: str#
[Deprecated] The logged-in user identifier for this channel.
Retained for API compatibility with the v2 surface. Forwards to
local_connection_id, the closest analogue in the new omniclient-backed model.
- property logged_user_name: str#
[Deprecated] The logged-in user name for this channel.
Retained for API compatibility with the v2 surface; always returns “”.
- property stopped#
Whether channel is stopped or not.