Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / PongPayload

Interface: PongPayload ​

Defined in: packages/ts-sdk/src/session.ts:50

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#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)

optional nonce?: string | null

Defined in: packages/ts-sdk/src/session.ts:51

Released under the MIT License.