UNPKG

@signalk/streams

Version:

Utilities for handling streams of Signal K data

26 lines 794 B
import { Transform, TransformCallback } from 'stream'; import type { CreateDebug } from './types'; interface UdpOptions { port: number; host?: string; app: { on(event: string, cb: (...args: any[]) => void): void; setProviderError(id: string, msg: string): void; }; providerId: string; outEvent?: string; createDebug?: CreateDebug; [key: string]: unknown; } export default class Udp extends Transform { private readonly options; private readonly debug; private socket; private pipeTo; constructor(options: UdpOptions); pipe<T extends NodeJS.WritableStream>(pipeTo: T): T; _transform(chunk: Buffer, encoding: BufferEncoding, done: TransformCallback): void; end(): this; } export {}; //# sourceMappingURL=udp.d.ts.map