Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //public IActionResult PulseNest()
- public async Task<ActionResult> PulseNest()
- {
- ViewData["Title"] = "PulseNest";
- Listener nl = new Listener();
- nl.startListening();
- return View();
- }
- public async void startListening()
- {
- listen([...]);
- drawing();
- }
- [...]
- private async Task drawing()
- {
- do
- {
- if (pool.Count > 0)
- {
- //This is the call for the SignalR sending data to the front
- await uH.SendNewPoint(pool[rdm.Next(0, pool.Count - 1)]);
- }
- } while (true);
- }
- [...]
- private async Task listen([...])
- {
- //[Retrieving Data]
- processData([...]);
- }
- [...]
- private void processData([...])
- {
- //[Processing the data and adding it to the pool]
- }
- Listener nl = new Listener();
- Task listening = nl.startListening();
- listening.Start();
- return View();
- public async Task startListening()
- {
- Task listening = listen([...]);
- listening.Start();
- Task draw = drawing();
- draw.Start();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement