The socket abstraction of flowR. Essentially a subset of what the default net.Socket of node provides.

interface Socket {
    end(): void;
    on(event: "error", listener: ((e: unknown) => void)): void;
    on(event: "close", listener: (() => void)): void;
    on(event: "data", listener: ((data: Buffer) => void)): void;
    remoteAddress?: string;
    remotePort?: number;
    write(data: string): void;
}

Implemented by

Properties

remoteAddress?: string
remotePort?: number

Methods

  • Parameters

    • event: "error"
    • listener: ((e: unknown) => void)
        • (e): void
        • Parameters

          • e: unknown

          Returns void

    Returns void

  • Parameters

    • event: "close"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • event: "data"
    • listener: ((data: Buffer) => void)
        • (data): void
        • Parameters

          • data: Buffer

          Returns void

    Returns void