"""The frame server: catches each client up, then feeds it every frame. One thread per client is the simple design that satisfies the contract ("a stalled client is slowed, not queued"): a client's socket is written to synchronously, and a slow write blocks only that client. """ from __future__ import annotations import argparse import socket from typing import Iterable from .capture import CaptureBackend, CommandCapture DEFAULT_SOCKET = "/run/hyprland-headless-stream/stream.sock" class FrameServer: def __init__(self, socket_path: str, capture: CaptureBackend, fps: int, fmt: str = "image/png") -> None: raise NotImplementedError def serve_forever(self) -> None: """Bind, then serve until stopped. A stale socket file is replaced.""" raise NotImplementedError def build_parser() -> argparse.ArgumentParser: raise NotImplementedError def main(argv: Iterable[str] | None = None) -> int: raise NotImplementedError __all__ = ["FrameServer", "DEFAULT_SOCKET", "CaptureBackend", "CommandCapture", "socket", "build_parser", "main"]