Table of Contents

Interface ISdk

Namespace
Huddly.Sdk
Assembly
Huddly.Sdk.dll

Main interface for interacting with the Huddly SDK.

Intended to run for the lifetime of an application. Only one instance should run at a time. Derived resources should be disposed before disposing the sdk instance.

public interface ISdk : IDisposable
Inherited Members

Methods

GetMonitoredDevices()

IImmutableDictionary<string, IDevice> GetMonitoredDevices()

Returns

IImmutableDictionary<string, IDevice>

A collection of all currently monitored devices

IsMonitoring()

bool IsMonitoring()

Returns

bool

A bool indicating if the ISdk is actively monitoring or not

StartMonitoring(int, CancellationToken)

Starts monitoring and discovery of devices.

Consumers should subscribe to the DeviceConnected and DeviceDisconnected events before calling this method

Task StartMonitoring(int timeout_ms = -1, CancellationToken ct = default)

Parameters

timeout_ms int
ct CancellationToken

Returns

Task

StopMonitoring()

Stops monitoring and discovery of devices

[Obsolete("Use Dispose() and create a new SDK instance instead. Method will be removed in SDK version 3.")]
void StopMonitoring()

Events

DeviceConnected

Fires on device connection.

event EventHandler<DeviceConnectionChangeEventArgs>? DeviceConnected

Event Type

EventHandler<DeviceConnectionChangeEventArgs>

DeviceDisconnected

Fires on device disconnect. The included device instance can no longer be used for communicating with the device.

In order to reconnect to the device, listen for a DeviceConnected event containing an IDevice with a matching Id.

event EventHandler<DeviceConnectionChangeEventArgs>? DeviceDisconnected

Event Type

EventHandler<DeviceConnectionChangeEventArgs>