Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / readyMessage

Function: readyMessage() ​

readyMessage(): ClientMessage

Defined in: packages/ts-sdk/src/messages.ts:21

Builds one ready socket message.

Most apps call matchSession.ready() instead of constructing envelopes manually. Use this helper when you are working directly with socket frames.

Example:

ts
import { readyMessage } from '@my-swu/simulator-client'

// Ready frames tell the server this seat can leave the lobby.
const clientMessage = readyMessage()

console.log(clientMessage.type)

Returns ​

ClientMessage

Example ​

ts
import { readyMessage } from '@my-swu/simulator-client'

const clientMessage = readyMessage()
console.log(clientMessage.type)

See ​

https://simulator-sdk.my-swu.com/guide/websocket

Released under the MIT License.