Actually the question in the title. I have a server-side Blazor app where the web client "talks" to the server via WebSocket. How can I make the mobile app (Android / IOS) establish a connection to the server via websocket? I don't need a code example, only the theory behind this idea, and the possible architectural design description.
I often hear that WebSockets are difficult to scale compared to the request-response APIs. But I need a live connection between all my clients and the server. So I am trying to mix and match.
And another thing I want to test - is building a Blazor Webassembly app with a WebSocket connection, instead of a REST API (I really don't like RESTs). The goal is to increase the performance of the app (REST's latency is awful), make it stateful and responsive to the server's events, and have the autonomy of the Webassembly's client. And my question regarding this part: how can I do that?