Class AbstractMessageBufferAbstract

Implements

Constructors

  • Parameters

    • Optionalencoding: _MessageBufferEncoding

    Returns AbstractMessageBuffer

Accessors

  • get encoding(): _MessageBufferEncoding
  • Returns _MessageBufferEncoding

  • get numberOfBytes(): number
  • Returns number

Methods

  • Parameters

    • length: number

    Returns Uint8Array

  • Append data to the message buffer.

    Parameters

    • chunk: string | Uint8Array

      the data to append.

    Returns void

  • Parameters

    • buffer: Uint8Array
    • Optionallength: number

    Returns Uint8Array

  • Returns Uint8Array

  • Parameters

    • value: string
    • encoding: _MessageBufferEncoding

    Returns Uint8Array

  • Returns a string representation of an object.

    Parameters

    • value: Uint8Array
    • encoding: _MessageBufferEncoding

    Returns string

  • Tries to read the body of the given length.

    Parameters

    • length: number

      the amount of bytes to read.

    Returns undefined | Uint8Array

    the data or undefined int less data is available.

  • Tries to read the headers from the buffer

    Parameters

    • OptionallowerCaseKeys: boolean

      Whether the keys should be stored lower case. Doing so is recommended since HTTP headers are case insensitive.

    Returns undefined | Map<string, string>

    the header properties or undefined in not enough data can be read.