Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Segment<TProps>

A segment of a message. Each message sent to the server or received from it will consist of multiple segments. Each segment itself is versionized and has a segment type. Segments within a message are numbered.

Type parameters

Hierarchy

  • Segment

Index

Constructors

constructor

  • new Segment(arg: string | string[][] | TProps): Segment
  • Parameters

    • arg: string | string[][] | TProps

    Returns Segment

Properties

Optional reference

reference: number

Segments can reference other segments. This is the referenced segment's number.

segNo

segNo: number

The segments are numbered within a message. This represents the segment's message.

Abstract type

type: string

This segment's type.

version

version: number

The version of this segment.

Accessors

debugString

  • get debugString(): string | string[]
  • Generate a textual representation for debug purposes.

    Returns string | string[]

Methods

Protected defaults

  • defaults(): void
  • Segments can override this function to provide defaults for their properties.

    Returns void

Protected Abstract deserialize

  • deserialize(input: string[][]): void
  • Deerialize a segment from an array of data groups (which is an array of data elements).

    Parameters

    • input: string[][]

    Returns void

Protected Abstract serialize

  • serialize(): (string | string[])[]
  • Serialize this segment into an array of data groups (which is an array of data elements).

    Returns (string | string[])[]

toString

  • toString(): string
  • Serialize the segment into a string that can be used for serializing a request.

    Returns string

Generated using TypeDoc