I want to make many calls down a websocket and get a result for each call.
ie
_svc.DoAthing(param) =broker calls=> ws.SendMessage(doathingmessage(ticket))
<=broker returns= ws.Onmessage+=handler=>(doathingresult(ticket))
what is the best way to make a broker such that
- This async request appears synchronous
- The broker can handle hundreds of requests
- The client should not be constantly polling on its thread, it should either block or await.
Not sure if a having a bunch of threads polling for tickets completed is the best way.