Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/willow/src/wgps/transports/in_memory.ts>TransportInMemory

A Willow Data Model and Willow General Purpose Sync protocol implementation in TypeScript.
Latest
class TransportInMemory
implements Transport
import { TransportInMemory } from "https://deno.land/x/willow@0.3.5/src/wgps/transports/in_memory.ts";

Constructors

new
TransportInMemory(
syncRole: SyncRole,
incoming: FIFO<Uint8Array | TRANSPORT_CLOSED>,
outgoing: FIFO<Uint8Array | TRANSPORT_CLOSED>,
)

Properties

private
closed: boolean
private
incoming: FIFO<Uint8Array | TRANSPORT_CLOSED>
private
outgoing: FIFO<Uint8Array | TRANSPORT_CLOSED>
readonly
isClosed: boolean
role: SyncRole

Methods

close(): void
send(bytes: Uint8Array): Promise<void>
[Symbol.asyncIterator](): AsyncIterator<Uint8Array>