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

x/earthstar/src/test/rpc-dep-node.ts>Connection

A specification and Javascript library for building online tools you can truly call your own.
Go to Latest
class Connection
implements IConnection<BagType>
Re-export
import { Connection } from "https://deno.land/x/earthstar@v9.3.3/src/test/rpc-dep-node.ts";

Constructors

new
Connection(opts: ConnectionOpts<BagType>)

Type Parameters

BagType extends FnsBag

Properties

_closeCbs: Set<Thunk>
_deferredRequests: Map<string, Deferred<any>>
_deviceId: string
_lastSeen: number
_methods: BagType
_otherDeviceId: string | null
_sendEnvelope: (conn: IConnection<BagType>, env: Envelope<BagType>) => Promise<void>
_transport: ITransport<BagType>
description: string
readonly
isClosed: boolean

Methods

close(): void
notify<MethodKey extends keyof BagType>(method: MethodKey, ...args: Parameters<BagType[MethodKey]>): Promise<void>
request<MethodKey extends keyof BagType>(method: MethodKey, ...args: Parameters<BagType[MethodKey]>): Promise<ReturnType<BagType[MethodKey]>>