Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CandidateStats

Candidate stats.

Hierarchy

  • BaseStats
    • CandidateStats

Index

Constructors

constructor

Properties

Private __turnTransportProtocol

__turnTransportProtocol: ProtocolType
internal

Private _ipAddress

_ipAddress: string
internal

Private _port

_port: number
internal

Private _priority

_priority: number
internal

Private _protocol

_protocol: ProtocolType
internal

Private _relatedIPAddress

_relatedIPAddress: string
internal

Private _relatedPort

_relatedPort: number
internal

Private _type

_type: CandidateType
internal

Methods

Protected deserializeProperties

  • deserializeProperties(key: string, valueJson: string): void
  • Deserializes the properties.

    Parameters

    • key: string

      The key.

    • valueJson: string

      The value in JSON format.

    Returns void

getIPAddress

  • getIPAddress(): string
  • Gets the IP address.

    Returns string

getId

  • getId(): string
  • Gets the identifier of the object generating these stats.

    Returns string

getIsHost

  • getIsHost(): boolean
  • Gets whether the candidate is host/local.

    Returns boolean

getIsReflexive

  • getIsReflexive(): boolean
  • Gets whether the candidate is reflexive.

    Returns boolean

getIsRelayed

  • getIsRelayed(): boolean
  • Gets whether the candidate is relayed.

    Returns boolean

getPort

  • getPort(): number
  • Gets the port.

    Returns number

getPriority

  • getPriority(): number
  • Gets the priority.

    Returns number

getProtocol

  • getProtocol(): ProtocolType
  • Gets the protocol.

    Returns ProtocolType

getRelatedIPAddress

  • getRelatedIPAddress(): string
  • Gets the related IP address.

    Returns string

getRelatedPort

  • getRelatedPort(): number
  • Gets the related port.

    Returns number

getTimestamp

  • getTimestamp(): DateTime
  • Gets the timestamp when these stats were generated.

    Returns DateTime

getTurnProtocol

  • getTurnProtocol(): ProtocolType
  • Gets the protocol used by this candidate when communicating with a TURN (relay) server. If unknown or not a relayed candidate, defaults to ProtocolType.Unknown.

    Returns ProtocolType

getType

  • getType(): CandidateType
  • Gets the type.

    Returns CandidateType

getTypeString

  • getTypeString(): string

Private protocolTypeFromString

  • protocolTypeFromString(protocolTypeString: string): ProtocolType
  • internal

    Parameters

    • protocolTypeString: string

    Returns ProtocolType

Private protocolTypeToString

  • protocolTypeToString(protocolType: ProtocolType): string
  • internal

    Parameters

    • protocolType: ProtocolType

    Returns string

Protected serializeProperties

  • serializeProperties(jsonObject: Hash<string, string>): void
  • Serializes the properties.

    Parameters

    • jsonObject: Hash<string, string>

      The JSON object.

    Returns void

setIPAddress

  • setIPAddress(value: string): void
  • internal

    Parameters

    • value: string

    Returns void

setId

  • setId(value: string): void
  • internal

    Parameters

    • value: string

    Returns void

setPort

  • setPort(value: number): void
  • internal

    Parameters

    • value: number

    Returns void

setPriority

  • setPriority(value: number): void
  • internal

    Parameters

    • value: number

    Returns void

setProtocol

  • setProtocol(value: ProtocolType): void
  • internal

    Parameters

    • value: ProtocolType

    Returns void

setRelatedIPAddress

  • setRelatedIPAddress(value: string): void
  • internal

    Parameters

    • value: string

    Returns void

setRelatedPort

  • setRelatedPort(value: number): void
  • internal

    Parameters

    • value: number

    Returns void

setTimestamp

  • setTimestamp(value: DateTime): void
  • internal

    Parameters

    • value: DateTime

    Returns void

setTurnProtocol

  • setTurnProtocol(value: ProtocolType): void
  • internal

    Parameters

    • value: ProtocolType

    Returns void

setType

  • setType(value: CandidateType): void
  • internal

    Parameters

    • value: CandidateType

    Returns void

toJson

  • toJson(): string
  • Serializes this to JSON.

    Returns string

Private typeFromString

  • typeFromString(typeString: string): CandidateType
  • internal

    Parameters

    • typeString: string

    Returns CandidateType

Private typeToString

  • typeToString(type: CandidateType): string
  • internal

    Parameters

    • type: CandidateType

    Returns string

Static fromJson

  • fromJson(candidateJson: string): CandidateStats
  • Derializes candidate stats from JSON.

    Parameters

    • candidateJson: string

      The candidate's stats JSON.

    Returns CandidateStats

Static fromJsonArray

  • fromJsonArray(candidatesJson: string): CandidateStats[]
  • Derializes an array of candidate stats from JSON.

    Parameters

    • candidatesJson: string

      The candidates' stats JSON.

    Returns CandidateStats[]

Static toJson

  • toJson(candidate: CandidateStats): string
  • Serializes candidate stats to JSON.

    Parameters

    • candidate: CandidateStats

      The candidate's stats.

    Returns string

Static toJsonArray

  • toJsonArray(candidates: CandidateStats[]): string
  • Serializes an array of candidate stats to JSON.

    Parameters

    • candidates: CandidateStats[]

      The candidates' stats.

    Returns string