docs.unity3d.com
    Show / Hide Table of Contents

    Interface IRoomMonitoring

    Provides functionalities to start or stop monitoring rooms.

    Namespace: Unity.Cloud.Presence
    Syntax
    public interface IRoomMonitoring

    Properties

    AllMonitoredRooms

    Gets all monitored rooms.

    Declaration
    ReadOnlyDictionary<RoomId, BaseRoom> AllMonitoredRooms { get; }
    Property Value
    Type Description
    ReadOnlyDictionary<RoomId, BaseRoom>

    ConnectionStatus

    Gets the status of the connection to the monitoring service.

    Declaration
    ConnectionStatus ConnectionStatus { get; }
    Property Value
    Type Description
    ConnectionStatus

    Methods

    StartMonitoringAsync(BaseRoom, IRetryPolicy, CancellationToken)

    Starts monitoring a room for participant connections.

    Declaration
    Task StartMonitoringAsync(BaseRoom room, IRetryPolicy retryPolicy, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    BaseRoom room

    The room to monitor

    IRetryPolicy retryPolicy

    The retry policy to execute the operation

    CancellationToken cancellationToken

    Cancellation token that will try to cancel the operation

    Returns
    Type Description
    Task

    Task representing the request to monitor

    StopMonitoringAllAsync()

    Stops monitoring all rooms.

    Declaration
    Task StopMonitoringAllAsync()
    Returns
    Type Description
    Task

    Task representing the request to stop monitoring

    StopMonitoringAsync(BaseRoom, IRetryPolicy, CancellationToken)

    Stops monitoring a room for participant connections.

    Declaration
    Task StopMonitoringAsync(BaseRoom room, IRetryPolicy retryPolicy, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    BaseRoom room

    The room to stop monitoring

    IRetryPolicy retryPolicy

    The retry policy to execute the operation

    CancellationToken cancellationToken

    Cancellation token that will try to cancel the operation

    Returns
    Type Description
    Task

    Task representing the request to stop monitoring

    Events

    ConnectionStatusChanged

    Generates an event when the status of the connection changes.

    Declaration
    event Action<ConnectionStatus> ConnectionStatusChanged
    Event Type
    Type Description
    Action<ConnectionStatus>

    ParticipantConnected

    Generates an event whenever a participant connects to any monitored room.

    Declaration
    event Action<IParticipant> ParticipantConnected
    Event Type
    Type Description
    Action<IParticipant>

    ParticipantDisconnected

    Generates an event whenever a participant disconnects to any monitored room.

    Declaration
    event Action<IParticipant> ParticipantDisconnected
    Event Type
    Type Description
    Action<IParticipant>

    Extension Methods

    GenericDataExtensions.SerializeToByteArray(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023