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

x/willow/src/wgps/types.ts>Transport

Exploring Willow in the most efficient and sound programming language
Go to Latest
interface Transport
import { type Transport } from "https://deno.land/x/willow@0.2.1/src/wgps/types.ts";

A transport for receiving and sending data to with another peer

Properties

role: SyncRole

Whether this transport comes from the initiating party (Alfie), or not (Betty).

readonly
isClosed: boolean

Methods

send(bytes: Uint8Array): Promise<void>

Send bytes to the other peer using this transport.

[[Symbol.asyncIterator]](): AsyncIterator<Uint8Array>

An async iterator of bytes received from the other peer via this transport.

close(): void

Close the connection with the other peer.