Skip to main content

run_server

Function run_server 

Source
pub fn run_server(
    running: Arc<AtomicBool>,
    config: ServerConfig,
    device_config: DeviceConfig,
    family: DeviceFamily,
) -> Result<(), ServerError>
Expand description

Run the server loop until running is false.

Accepts an AtomicBool within an Arc<> for signaling when the server should shut down (set to false).

Accepts config and device_config for specifying ServerConfig and DeviceConfig.

family specifies the DeviceFamily to find and pass to spawn_reader for feeding the server device frames.