public async Task NotifyAsync(uint[] ids, string func, SenderMessage payloda) { foreach (var item in ids) { await SendAsync(item, func, payloda); } }
public void Notify(uint[] ids, string func, SenderMessage payloda) { foreach (var item in ids) { Send(item, func, payloda); } }
public void Send(uint client, string func, SenderMessage data) { var cl = world.GetComponent <SessionComponent>(client); if (cl == null) { return; } cl.gameSession.Send(func, data); }
public async Task SendAsync(uint client, string func, SenderMessage data) { var cl = world.GetComponent <SessionComponent>(client); if (cl == null) { return; } await cl.gameSession.SendAsync(func, data); }
public static string Convert(string func, SenderMessage payloda) { SendData data = new SendData(); data.func = func; data.data = payloda; string res = JsonConvert.SerializeObject(data); Return(data); return(res); }