Skip to content
sstreamzet/docs
Linux SDK previewOpen console
Developer docs / Linux SDK
API and integration guide · Updated 2026-09-23

Linux API reference

Go fields, C JSON names, return codes and memory ownership. Configuration validation runs before any worker is started.

Downloads and public test settings

Download the files below directly. The downloads guide provides the public test key and configuration; pair the device code in your own account for testing.

Linux SDK · AMD64

preview / linux 0.3.3

C library and header, runnable C/Go examples, source and test configuration for Intel/AMD 64-bit.

Ubuntu 24.04 / x86_64 · 18.3 MiB · ZIP

Download

streamzet-linux-sdk-preview-20260923-key-amd64.zip

Verify SHA-256
sha256
e22b4792bbdc58878c67c5104d182422f8accfea9da10379252e0a5296d3e57a
Download checksum file

Linux SDK · ARM64

preview / linux 0.3.3

C library and header, runnable C/Go examples, source and test configuration for ARM 64-bit. Not for xSpan ARMv5.

Ubuntu 24.04 / aarch64 · 16.7 MiB · ZIP

Download

streamzet-linux-sdk-preview-20260923-key-arm64.zip

Verify SHA-256
sha256
58d120c0f123169726077a8845ac2619692cb14b45058e72a5aaa80700d6e5d0
Download checksum file

sdk.Options / top-level JSON

Field / APIType / defaultContract
Config / configsdk.Config · requiredEndpoint and feature configuration below. Start validates and defaults a copy.
StateDir / state_dirstring · requiredAbsolute owned directory, 0700, not a symlink. Created if absent. Exclusive file lock prevents simultaneous identity use. Keep it across updates; never clone to another device.
Fleet / fleetbool · falseOpt in to remote batch commands as the host OS user while support runs.

sdk.Config / config

Field / APIType / defaultContract
APIKey / api_keystring · requiredStreamZet key: sz_test_public for evaluation, or an issued sz_live_ key for tenant enrollment. The SDK manages service endpoints and its public transport key.
DeviceName / device_namestring · hostnameEmpty uses os.Hostname(); resulting name must be nonblank and at most 128 UTF-8 bytes.
CaptureHelper / capture_helperstring · /usr/lib/streamzet/streamzet-captureAbsolute helper path; required even when terminal mode ignores capture. Existence is checked when desktop capture starts, not during Start.
Mode / modestring · autoEmpty becomes auto. auto detects the current user’s desktop; terminal forces terminal-only. Other values rejected.
RelayOnly / relay_onlybool · falsetrue limits WebRTC to relay candidates; requires TURN. false permits direct and relay paths.

Go lifecycle

Field / APIType / defaultContract
Start(ctx, options)(*Support, error)ctx: non-nil, not canceled context.Context. options: sdk.Options. Rejects root, invalid config/path, occupied process/state, filesystem/identity failures. ErrRunning means another SDK worker in this process. Success starts async enrollment; no services or signal handlers installed.
Support.Stop()voidIdempotent, nonblocking cancellation. Does not confirm shutdown completion.
Support.Wait()errorBlocks until worker ends; nil on normal stop, terminal worker error otherwise. Do not call on a GUI thread.
Support.Done()<-chan struct{}Read-only channel closed when all worker cleanup completes.
Support.Identity()IdentityThread-safe public snapshot; no secret. DeviceCode fills after enrollment; DeviceID may exist before registration. Not a presence signal.

C ABI

Field / APIType / defaultContract
StreamzetStart(char *json)intNUL-terminated UTF-8 JSON copied before return; caller owns input. Rejects unknown fields and trailing JSON. 0: started; 1: invalid/start error; 2: handle already started (Stop before reuse, even if worker ended).
StreamzetStatus()char * · owned JSONSnapshot fields below. Call StreamzetFree exactly once on the returned pointer. Calls serialize with Start/Stop; Status can block during Stop.
StreamzetStop()voidSerialized, idempotent and blocking; requests stop, waits, clears handle. Call from a worker. Does not delete identity.
StreamzetFree(char *value)voidOnly a Status-owned pointer or NULL. Do not free twice or pass caller-owned/Go pointers.

Identity and C status fields

Field / APIType / defaultContract
runningboolean · falseWorker is alive. It does not mean online, enrolled or viewer-connected.
errorstring · ""Last synchronous Start failure or error collected by Stop. Empty means no recorded error, not network success.
identityobject · omittedPresent while the C handle exists; omitted before Start/after Stop. No secret or instance_id is exposed.
Identity.DeviceID / identity.device_idstringPersistent public UUID, created before enrollment.
Identity.DeviceCode / identity.device_codestring · ""Pairing code after enrollment; empty while unregistered.