stream_init: Initialize the shidashi stream directory for a Shiny session

View source: R/stream.R

stream_initR Documentation

Initialize the shidashi stream directory for a Shiny session

Description

Call once in the server function to set up the directory that stream_path and stream_to_js will write to. When running inside a shidashi template the directory is automatically resolved from the template root; when running in plain Shiny a temporary directory is created and registered with addResourcePath so that the browser can fetch stream/{token}_{id}.bin. An optional cleanup hook is registered to remove this session's files when the session ends.

Usage

stream_init(session = shiny::getDefaultReactiveDomain())

Arguments

session

Shiny session object. Defaults to the currently active reactive domain.

Value

Invisibly returns the absolute path to the stream directory.

See Also

stream_path, stream_to_js


shidashi documentation built on April 10, 2026, 5:07 p.m.