UNPKG

@signalk/streams

Version:

Utilities for handling streams of Signal K data

32 lines 1.08 kB
import { Transform, TransformCallback } from 'stream'; import type { CreateDebug } from './types'; interface TcpOptions { host: string; port: number; app: { on(event: string, cb: (...args: any[]) => void): void; emit(event: string, ...args: unknown[]): void; setProviderStatus(id: string, msg: string): void; setProviderError(id: string, msg: string): void; }; providerId: string; noDataReceivedTimeout?: string | number; outEvent?: string; toStdout?: string | string[]; createDebug?: CreateDebug; [key: string]: unknown; } export default class TcpStream extends Transform { private readonly options; private readonly debug; private readonly debugData; private readonly noDataReceivedTimeout; private tcpStream; private reconnector; constructor(options: TcpOptions); pipe<T extends NodeJS.WritableStream>(pipeTo: T): T; end(): this; _transform(data: Buffer, encoding: BufferEncoding, callback: TransformCallback): void; } export {}; //# sourceMappingURL=tcp.d.ts.map