@epicgames-ps/lib-pixelstreamingcommon-ue5.5
@epicgames-ps/lib-pixelstreamingcommon-ue5.5 / Protocol/KeepaliveMonitor / 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.
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.
The connection that we want to monitor.
number
The time in milliseconds between ping messages.
optionalonTimeout: () =>void
Defined in: Protocol/KeepaliveMonitor.ts:23
Called when a pong does not come back from a ping.
void
get RTT():
number
Defined in: Protocol/KeepaliveMonitor.ts:28
Gets the Round Trip Time of the current connection in milliseconds.
number