Interface IMultiplayerService

interface IMultiplayerService {
    get brackets(): BracketDefinition[];
    get match(): WatchedValue<null | Match>;
    get matchBracketDefId(): WatchedValue<null | number>;
    get matchJoinIds(): WatchedValue<string[]>;
    get matchmakingInfo(): WatchedValue<null | MatchmakingInfo>;
    acceptAndJoin(factory: IMatchHandlerFactory, signals?: MatchmakingAcceptSignals): Promise<void>;
    findMatches(bracketId: number): Promise<void>;
    leave(): Promise<void>;
    refreshBrackets(): Promise<void>;
    rejoin(matchId: string, meta: Kv<string>, factory: IMatchHandlerFactory, signals: MatchmakingAcceptSignals, retries?: number): Promise<void>;
    send(opCode: number, payload: string | Uint8Array, retries?: number): Promise<void>;
}

Accessors

Methods

  • Parameters

    • opCode: number
    • payload: string | Uint8Array
    • Optionalretries: number

    Returns Promise<void>