Files
punktfunk/docs-site/content/docs/clients.md
T
enricobuehler 9c8fa9340c
apple / swift (push) Failing after 40s
audit / cargo-audit (push) Failing after 1m12s
windows-msix / package (push) Successful in 1m37s
windows / build (push) Successful in 1m14s
android / android (push) Successful in 4m48s
ci / web (push) Successful in 27s
ci / rust (push) Successful in 4m21s
ci / docs-site (push) Successful in 31s
ci / bench (push) Successful in 4m39s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 19s
deb / build-publish (push) Successful in 6m3s
flatpak / build-publish (push) Successful in 4m13s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m15s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m16s
docker / deploy-docs (push) Successful in 18s
refactor: drop milestone names + consolidate clients; loss-recovery & rumble fixes
Two bodies of work in one commit (the rename moved files the fixes also touched).

Naming/structure cleanup (pre-launch):
- Host modules m3.rs->punktfunk1.rs, m0.rs->spike.rs; CLI m3-host->punktfunk1-host,
  m0->spike; bare `punktfunk-host` now prints help. Types M3Options/M3Source->
  Punktfunk1Options/Punktfunk1Source.
- Clients consolidated out of crates/ into clients/: punktfunk-client-rs->
  clients/probe (crate punktfunk-probe), client-linux->clients/linux,
  client-windows->clients/windows, punktfunk-android->clients/android/native
  (crate punktfunk-client-android; kept [lib] name=punktfunk_android so the JNI
  contract is unchanged). crates/ now holds only core + host.
- Milestone codes M0-M4 purged from code/CLI/CLAUDE.md/README/docs/docs-site,
  kept only in docs/implementation-plan.md. docs/m2-plan.md->
  docs/gamestream-host-plan.md. CI/gradle/flatpak paths updated.

Client loss-recovery (video froze and never recovered after a brief drop):
- Export punktfunk_connection_frames_dropped through the C ABI (the core already
  tracked it for the client keyframe-recovery loop; it was never reachable from
  the ABI clients). Regenerated punktfunk_core.h.
- Apple (StreamPump + Stage2Pipeline) and Android (decode.rs) now poll
  frames_dropped and request a keyframe when it climbs -- the same loss-driven
  recovery Linux/Windows already had. Under infinite GOP the decoder silently
  conceals reference-missing frames, so the decode-error trigger rarely fires.

Apple rumble robustness (worked then went spotty -- DualSense + Xbox):
- Add CHHapticEngine stopped/reset handlers (rebuild on app background / audio
  interruption / server reset) and drop the permanent `broken` latch on a
  transient drive failure; latch only when the controller truly has no haptics.
- Surface swallowed SDL set_rumble errors on Linux/Windows + diagnostic logging.

Verified: cargo build/clippy/fmt --workspace, C-ABI harness, header drift.
Not runnable on this box (verify in CI): Gitea workflows, gradle/Android,
flatpak, Swift/decky.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 21:05:58 +00:00

4.6 KiB

title, description
title description
Clients The ways to connect to a punktfunk host — the Apple app, Moonlight, or the Linux client.

A punktfunk host accepts clients over its own punktfunk/1 protocol (the Apple and Linux apps) and over GameStream (Moonlight). Pick whichever fits the device you're streaming to.

Apple app (Mac, iPhone, iPad, Apple TV)

The native app for Apple devices speaks punktfunk's own punktfunk/1 protocol — the lowest-latency, most resilient path, with the full feature set:

  • Automatic host discovery — hosts on your network appear under On this network; no IP typing.
  • PIN pairing built in, and pinned reconnects after that.
  • Controllers, including DualSense — rumble, adaptive triggers, lightbar, motion, and touchpad.
  • A live stats overlay (resolution, fps, bitrate, latency) and a built-in network speed test to pick a bitrate for your link.

Open the app, pick your host, pair once, and stream. It builds from the clients/apple directory in the repo (Swift / VideoToolbox / Metal).

Moonlight (anything else)

punktfunk also speaks the GameStream protocol, so any Moonlight client — Windows, Android, Steam Deck, a browser, an old phone — connects with no punktfunk-specific software. See Connect with Moonlight.

This is the broadest-compatibility option and great for couch gaming. It doesn't use the native protocol's FEC/encryption extensions, but for a healthy LAN that rarely matters.

Linux desktop client (GTK4)

punktfunk-client is the native graphical Linux client — a GTK4 / libadwaita app that speaks punktfunk/1 directly, with hardware decode (VAAPI → dmabuf on Intel/AMD, software fallback), PipeWire audio, and SDL3 controllers (rumble, lightbar, DualSense touchpad/motion). Like the Apple app it discovers hosts on your network automatically, does PIN pairing, and pins reconnects.

It ships as a real package, not just a source build:

  • Ubuntu / Debianapt install punktfunk-client from the punktfunk apt registry (see packaging/debian/README.md).
  • Fedora / Bazziterpm-ostree install punktfunk-client from the Gitea RPM registry (see packaging/rpm/README.md).
  • Arch / SteamOS — the punktfunk-client split package from the PKGBUILD (see packaging/arch/README.md).
  • Steam Deck / any Flatpak distro — the io.unom.Punktfunk Flatpak bundle (see packaging/flatpak/README.md); this is what the Decky plugin launches.

Launch it, pick your host from the list, and stream. For scripting you can skip the host list and connect straight away:

punktfunk-client --connect <host>:9777   # skip the picker, start a session immediately

Windows desktop client (in development)

punktfunk-client for Windows (clients/windows) is the native graphical client for Windows — pure Rust, the same punktfunk/1 core as the Apple and Linux apps, with a WinUI 3 UI (host list, settings, PIN pairing) and the video on a SwapChainPanel, plus WASAPI audio, FFmpeg decode, SDL3 controllers, network discovery, and PIN pairing. Launch it and pick a host from the list, just like the Apple and Linux apps. It builds on x86_64-pc-windows-msvc; hardware (D3D11VA) decode, 10-bit/HDR present, and packaging are in progress, so it is not yet shipped. A headless CLI path exists for scripting/measurement:

punktfunk-client                                   # open the WinUI 3 window (host list / settings)
punktfunk-client --discover                        # list hosts on the network
punktfunk-client --headless --connect <host>:9777  # no window: connect, count frames, print stats

Until it ships, Moonlight remains the recommended way to stream to Windows (see below).

Linux reference client (headless)

punktfunk-probe (in the repo) is a command-line client for the native protocol, used for testing, development, and latency measurement — not an everyday client. It connects, streams to a file, runs the speed test, and can discover hosts:

punktfunk-probe --discover                        # list hosts on the network
punktfunk-probe --connect <host>:9777 --pin <fp>  # connect to one

Which should I use?

You're streaming to… Use
A Mac, iPhone, iPad, or Apple TV The Apple app
A Linux desktop or laptop, or a Steam Deck punktfunk-client (GTK4)
Windows, Android, a browser, a TV Moonlight
Automated tests / latency measurement punktfunk-probe (headless)

Whichever you choose, the first connection needs a one-time pairing.