@my-swu/simulator-client / PongPayload
Interface: PongPayload
Defined in: packages/ts-sdk/src/session.ts:38
Payload emitted on each server pong frame.
The nonce echoes back whatever was sent in the matching ping, allowing consumers to measure round-trip latency.
Example:
ts
import type { PongPayload } from '@my-swu/simulator-client'
const pongPayload: PongPayload = { nonce: 'host-latency-1' }
console.log(pongPayload)Example
ts
import type { PongPayload } from '@my-swu/simulator-client'
const latencyPong: PongPayload = { nonce: 'latency-check-1' }
console.log(latencyPong.nonce)See
https://simulator-sdk.my-swu.com/guide/websocket#ping-and-pong
Indexable
[
k:string]:unknown
Properties
nonce?
Example:
ts
import type { PongPayload } from '@my-swu/simulator-client'
const pongPayload: PongPayload = { nonce: 'host-latency-1' }
const { nonce } = pongPayload
console.log(nonce)
optionalnonce?:string|null
Defined in: packages/ts-sdk/src/session.ts:39
