Beispiel #1
0
 /// <summary>
 /// Called when we want to update a group's client list on snapserver
 /// </summary>
 /// <param name="id">group id</param>
 /// <param name="clientIds">client ids</param>
 private async Task _SetGroupClientsAsync(string id, string[] clientIds)
 {
     Debug("Sending Group.SetClients - id {0}, clients {1}", id, string.Join(",", clientIds));
     ServerUpdateCommandResult result =
         await m_JsonRpc.InvokeWithParameterObjectAsync<ServerUpdateCommandResult>("Group.SetClients",
             new GroupSetClientsCommand() {id = id, clients = clientIds}); // update the server)
     _ServerUpdated(result.server); // update our local data
 }
Beispiel #2
0
 /// <summary>
 /// Called when we want to remove a client from snapserver
 /// </summary>
 /// <param name="id">client id</param>
 /// <param name="latency">new latency</param>
 private async Task _RemoveClientAsync(string id)
 {
     Debug("Sending Server.DeleteClient - id {0}", id);
     ServerUpdateCommandResult result =
         await m_JsonRpc.InvokeWithParameterObjectAsync<ServerUpdateCommandResult>("Server.DeleteClient",
             new RemoveClientCommand() {id = id}); // update the server
     _ServerUpdated(result.server);
 }