kernl API
    Preparing search index...

    Interface TorrentServiceOptions

    What the torrent service needs from the shell.

    interface TorrentServiceOptions {
        appletOf: (windowId: string) => AppletIdentity | undefined;
        ask: (windowId: string, question: DownloadQuestion) => Promise<boolean>;
        connections: ConnectionRouting<TorrentClient>;
        now?: () => number;
        ownerOf: (windowId: string) => string | undefined;
        pollMs?: number;
        storage: StorageLike;
    }

    Hierarchy (View Summary)

    Index
    appletOf: (windowId: string) => AppletIdentity | undefined

    The verified applet a window runs, or undefined when the window is not a live applet.

    ask: (windowId: string, question: DownloadQuestion) => Promise<boolean>

    Put a question to the person in the name of a window's applet; resolves true only on yes.

    connections: ConnectionRouting<TorrentClient>

    The person's torrent connections, read on every request: new torrents go to one, and each job stays on its own.

    now?: () => number

    Milliseconds since the epoch; Date.now by default.

    ownerOf: (windowId: string) => string | undefined

    The key what a window's applet starts is kept under: its catalogue id, the same across versions and never shared by another publisher's applet with the same name. Undefined when the window is not a live applet.

    pollMs?: number

    How often jobs with a live window are refreshed and pushed; 2000 ms by default.

    storage: StorageLike

    Where records that must outlive a window are kept; keys are written under the kernl namespace.