we have a project with 1 server and 2 clients
- server (webapi c#-mvc) : that is run on https:domain.com:2020.
- client1 : android app
- client2 : raspberry device (as an IoT device)
these two clients use WebApis to connect to the server and get and post commands and change status in database with api calls.
problem : clients have to do polling (real-time) to the server to find if there is a change in database to update their status. what can i use for this polling ? i thinks socket is the best but i don't know how should i use socket in my webapi, i saw a lot of examples but all of them are running on console app.
i found this example but i think it's not complete code and i don't know how should i use it in my webapi controllers. should i inherit of it or not?
thanks in advance :)