@devgrid/netron
Version:
A powerful TypeScript library for building distributed systems with event bus, streaming capabilities, and remote object invocation. Features WebSocket-based bidirectional communication between Node.js and browser environments, service discovery, and type
14 lines (13 loc) • 645 B
TypeScript
import { RemotePeer } from "./remote-peer";
import { NetronReadableStream } from "./readable-stream";
import { NetronWritableStream } from "./writable-stream";
export type StreamType = 'readable' | 'writable';
export declare class StreamReference {
readonly streamId: number;
readonly type: StreamType;
readonly isLive: boolean;
readonly peerId: string;
constructor(streamId: number, type: StreamType, isLive: boolean, peerId: string);
static from(stream: NetronReadableStream | NetronWritableStream): StreamReference;
static to(ref: StreamReference, peer: RemotePeer): NetronReadableStream | NetronWritableStream;
}