Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Util

A utility namespace containing helper functions for the library.

Index

Functions

isEOL

  • isEOL(buffer: Buffer): boolean
  • Checks a buffer for an End of Line (\n | \r\n).

    Parameters

    • buffer: Buffer

      The buffer to check for EOL.

    Returns boolean

parseSB

  • Parses a subnegotiation sequence into the option and data.

    Parameters

    • buffer: Buffer

      The buffer to parse.

    Returns ISBParse

splitIAC

  • splitIAC(buffer: Buffer): Buffer[]
  • Splits a buffer into individual IAC sequences.

    Parameters

    • buffer: Buffer

      The input buffer.

    Returns Buffer[]

stripEOL

  • stripEOL(buffer: Buffer): Buffer
  • Strips EOL from the end of a buffer.

    Parameters

    • buffer: Buffer

      The buffer input.

    Returns Buffer

writeIAC

  • Creates a buffer containing an IAC sequence.

    Parameters

    • negotiate: Negotiation

      The negotiation byte for this IAC sequence.

    • option: Options

      The option byte for this IAC sequence.

    Returns Buffer

writeSB

  • writeSB(option: Options, data: string): Buffer
  • Creates a buffer containing a subnegotiation sequence.

    Parameters

    • option: Options

      The option byte for this subnegotiation sequence.

    • data: string

      The data for this subnegotiation sequence.

    Returns Buffer

Generated using TypeDoc