Interface Connection

interface Connection {
    localAddress: Address;
    readable: ReadableStream<Uint8Array>;
    remoteAddress: Address;
    writable: WritableStream<Uint8Array>;
    close(): void;
    read(buf: Uint8Array): Promise<number>;
    setKeepAlive(enable: boolean, delay: number): void;
    setNoDelay(enable?: boolean): void;
    shutdown(): void;
    write(buf: Uint8Array): Promise<number>;
}

Properties

localAddress: Address
readable: ReadableStream<Uint8Array>
remoteAddress: Address
writable: WritableStream<Uint8Array>

Methods

  • Returns void

  • Parameters

    • buf: Uint8Array

    Returns Promise<number>

  • Parameters

    • enable: boolean
    • delay: number

    Returns void

  • Parameters

    • Optionalenable: boolean

    Returns void

  • Returns void

  • Parameters

    • buf: Uint8Array

    Returns Promise<number>