private async void RoomListRecived(RoomList list) { mRoomsListBox.Items.Clear(); foreach (var room in list.Rooms) { await mMainForm.Talker.Send(mMainForm.Me, new RoomInfoPackage { ID = room }); } }
public async Task ProcessPackage(User user, RoomList package) { var result = new RoomList(); result.Rooms.AddRange(mServer.Rooms.Values.Select(r => r.ID)); await mServer.ClientListener.Send(user, result); }