Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/entries/universal.ts>PartnerWebClient

Storage for private, distributed, offline-first applications.
Go to Latest
class PartnerWebClient
import { PartnerWebClient } from "https://deno.land/x/earthstar@v10.2.0/src/entries/universal.ts";

A syncing partner created from an inbound HTTP connection (i.e. a web client).

Works everywhere, but is really meant for servers running on Deno and Node.

Constructors

new
PartnerWebClient(unnamed 0: SyncerDriverWebServerOpts)

Type Parameters

IncomingTransferSourceType extends WebSocket

Properties

private
incomingQueue: AsyncQueue<SyncerEvent>
private
socket: WebSocket
private
socketIsReady
concurrentTransfers: number
payloadThreshold: number
rangeDivision: number
syncAppetite: SyncAppetite

Methods

closeConnection(): Promise<void>
getEvents(): AsyncIterable<SyncerEvent>
handleTransferRequest(socket: IncomingTransferSourceType, kind: "upload" | "download"): Promise<ReadableStream<Uint8Array> | WritableStream<Uint8Array> | undefined>
sendEvent(event: SyncerEvent): Promise<void>