Skip to main content

add_subscription

Function add_subscription 

Source
pub fn add_subscription(
    token: &SessionID,
    topic: &SubscribeTopic,
    update_mode: &UpdateMode,
)
Expand description

Registers a new topic subscription for a specific client session.

Upon successful registration, this function immediately fetches the latest known state from the CONTINUOUS_BUFFER and dispatches it to the client. This guarantees the client interface is instantly populated with valid data.

ยงArguments

  • token - The unique session identifier of the requesting client.
  • topic - The specific engine state topic the client wishes to monitor.
  • update_mode - The frequency mode (e.g., continuous or on-change) for this subscription.