Contents

messageChannel(for:)

Creates or retrieves a message channel for the given message channel ID.

Declaration

@MainActor final func messageChannel(for channelID: FoveatedStreamingSession.MessageChannel.ID) -> FoveatedStreamingSession.MessageChannel?

Parameters

  • channelID:

    The ID of the requested message channel.

Return Value

The requested message channel if the session is connected and the channel ID is valid, otherwise nil.

Discussion

If a channel with the given ID already exists, returns the existing channel. Otherwise, creates a new channel and opens it asynchronously.