Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / MatchSessionOptions

Interface: MatchSessionOptions

Defined in: packages/ts-sdk/src/match-session/session-state.ts:109

Options for creating one SDK-owned match session.

These options configure session-owned state, event retention, and default socket handshake behavior.

Example:

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

const 
matchSessionOptions
: MatchSessionOptions = {
handshakeTimeoutMs
: 10_000,
maxEventHistory
: 25 }
console
.
log
(
matchSessionOptions
)

See

https://simulator-sdk.my-swu.com/guide/match-session

Extends

Properties

handshakeTimeoutMs?

Example:

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

const 
matchSessionOptions
: MatchSessionOptions = {
handshakeTimeoutMs
: 10_000,
maxEventHistory
: 25 }
const {
handshakeTimeoutMs
} =
matchSessionOptions
console
.
log
(
handshakeTimeoutMs
)

optional handshakeTimeoutMs?: number

Defined in: packages/ts-sdk/src/match-session/session-state.ts:98

Milliseconds to wait for welcome plus first snapshot.

Inherited from

MatchSessionConnectOptions.handshakeTimeoutMs


maxEventHistory?

Example:

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

const 
matchSessionOptions
: MatchSessionOptions = {
handshakeTimeoutMs
: 10_000,
maxEventHistory
: 25 }
const {
maxEventHistory
} =
matchSessionOptions
console
.
log
(
maxEventHistory
)

optional maxEventHistory?: number

Defined in: packages/ts-sdk/src/match-session/session-state.ts:111

Maximum number of recent game events retained by the session.

Released under the MIT License.