Skip to content

Latest commit

 

History

History
72 lines (38 loc) · 2.13 KB

File metadata and controls

72 lines (38 loc) · 2.13 KB

@epicgames-ps/lib-pixelstreamingcommon-ue5.5


@epicgames-ps/lib-pixelstreamingcommon-ue5.5 / Protocol/KeepaliveMonitor / KeepaliveMonitor

Class: KeepaliveMonitor

Defined in: Protocol/KeepaliveMonitor.ts:10

Used to regularly ping a protocol connection to make sure the connection is still good and open. When the pong doesn't come in response to a ping in time a callback is fired that can be handed by the owner.

Constructors

new KeepaliveMonitor()

new KeepaliveMonitor(protocol, timeout): KeepaliveMonitor

Defined in: Protocol/KeepaliveMonitor.ts:38

Creates a new monitor and starts the ping timer. If a pong does not come back by the time we want to send a second ping then the connection is considered dead and the onTimeout callback is fired.

Parameters

protocol

SignallingProtocol

The connection that we want to monitor.

timeout

number

The time in milliseconds between ping messages.

Returns

KeepaliveMonitor

Properties

onTimeout()?

optional onTimeout: () => void

Defined in: Protocol/KeepaliveMonitor.ts:23

Called when a pong does not come back from a ping.

Returns

void

Accessors

RTT

Get Signature

get RTT(): number

Defined in: Protocol/KeepaliveMonitor.ts:28

Gets the Round Trip Time of the current connection in milliseconds.

Returns

number