Exemple #1
0
        public static Task RpcAllAsync(this TMRoom @this, string methodName, params object[] args)
        {
            var rpcMethodName = $"TMRoom_{@this.Id}_{methodName}";
            var sendTasks     = @this.ClientInfos.Select(info => info.Client.RpcAsync(rpcMethodName, args));

            return(Task.WhenAll(sendTasks));
        }
Exemple #2
0
        public static Task RpcClientAsync(this TMRoom @this, TMClient client, string methodName, params object[] args)
        {
            var rpcMethodName = $"TMRoom_{@this.Id}_{methodName}";

            return(client.RpcAsync(rpcMethodName, args));
        }