Function rpcUnwrap

  • Unwraps the multicast results from an RPC call. Use this when calling multicast RPCs to get the per-client results with connection info. If you only need return values prefer rpcUnwrapReturn instead, which discards connection info and returns an array of return values.

    Type Parameters

    • T

    Parameters

    Returns Promise<RpcMulticastResult<T>[]>

    const results:RpcMulticastResult<boolean>[] = rpcUnwrap(await this.broadcast("Hello"));
    for (const r of results) {
    console.log(`Client ${r.connectionId}: ${r.returnValue}`);
    }