Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BufferPool

A pool of Buffers which allow you to read them as if they were one

internal

Hierarchy

  • BufferPool

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

[kBuffers]

[kBuffers]: Buffer[]

[kLength]

[kLength]: number

Accessors

length

  • get length(): number

Methods

append

  • append(buffer: Buffer): void
  • Adds a buffer to the internal buffer pool list

    Parameters

    • buffer: Buffer

    Returns void

peek

  • peek(size: number): Buffer
  • Returns the requested number of bytes without consuming them

    Parameters

    • size: number

    Returns Buffer

read

  • read(size: number, consume?: boolean): Buffer
  • Reads the requested number of bytes, optionally consuming them

    Parameters

    • size: number
    • consume: boolean = true

    Returns Buffer

Generated using TypeDoc