/ fm / liveswitch / DataChannelStats
Class: DataChannelStats
fm.liveswitch.DataChannelStats
Data channel stats.
Hierarchy
-
↳ DataChannelStats
Table of contents
Constructors
Methods
- deserializeProperties
- fmliveswitchDataChannelStatsInit
- getBytesReceived
- getBytesSent
- getId
- getLabel
- getMessagesReceived
- getMessagesSent
- getOrdered
- getProtocol
- getState
- getTimestamp
- getTypeString
- serializeProperties
- toJson
- fromJson
- fromJsonArray
- toJson
- toJsonArray
Constructors
constructor
+ new DataChannelStats(): DataChannelStats
Initializes a new instance of [[fm.liveswitch.dataChannelStats]].
Returns: DataChannelStats
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:37
Methods
deserializeProperties
▸ Protected
deserializeProperties(key
: string, valueJson
: string): void
Deserializes the properties.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key. |
valueJson |
string | The value in JSON format. |
Returns: void
Overrides: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:125
fmliveswitchDataChannelStatsInit
▸ Private
fmliveswitchDataChannelStatsInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:30
getBytesReceived
▸ getBytesReceived(): number
Gets the number of bytes received.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:165
getBytesSent
▸ getBytesSent(): number
Gets the number of bytes sent.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:177
getId
▸ getId(): string
Gets the identifier of the object generating these stats.
Returns: string
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/BaseStats.ts:57
getLabel
▸ getLabel(): string
Gets the label.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:189
getMessagesReceived
▸ getMessagesReceived(): number
Gets the number of messages received.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:201
getMessagesSent
▸ getMessagesSent(): number
Gets the number of messages sent.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:213
getOrdered
▸ getOrdered(): boolean
Gets whether the channel is ordered.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:225
getProtocol
▸ getProtocol(): string
Gets the protocol.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:237
getState
▸ getState(): DataChannelState
Gets the state.
Returns: DataChannelState
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:249
getTimestamp
▸ getTimestamp(): DateTime
Gets the timestamp when these stats were generated.
Returns: DateTime
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/BaseStats.ts:70
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:10
serializeProperties
▸ Protected
serializeProperties(jsonObject
: Hash<string, string>): void
Serializes the properties.
Parameters:
Name | Type | Description |
---|---|---|
jsonObject |
Hash<string, string> | The JSON object. |
Returns: void
Overrides: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:262
toJson
▸ toJson(): string
Serializes this to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:402
fromJson
▸ Static
fromJson(dataChannelJson
: string): DataChannelStats
Derializes data channel stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataChannelJson |
string | The data channel's stats JSON. |
Returns: DataChannelStats
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:62
fromJsonArray
▸ Static
fromJsonArray(dataChannelsJson
: string): DataChannelStats[]
Derializes an array of data channel stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataChannelsJson |
string | The data channels' stats JSON. |
Returns: DataChannelStats[]
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:79
toJson
▸ Static
toJson(dataChannel
: DataChannelStats): string
Serializes data channel stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataChannel |
DataChannelStats | The data channel's stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:96
toJsonArray
▸ Static
toJsonArray(dataChannels
: DataChannelStats[]): string
Serializes an array of data channel stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataChannels |
DataChannelStats[] | The data channels' stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataChannelStats.ts:111