Tuesday, 12 January 2021
  6 Replies
  870 Visits
Hello friends. Fist of all thank you for what was seeming to be an impossible task possible, running a websocket connection via an Android service. With the help of these components I've finally be able to establish a reliable direct connection between our windows server and android clients for performing a critical task.

Below is now what I'm trying to achieve.


My question is what is going to be the most correct and tenable way to achieve this. Each server has a unique ID, as does each client, servers will have a permanent internet connection clients may not.

My current plan of attack is:
Each server runs a server and client, accepts direct connections via the server and registers itself with the proxy using its client. The proxy registers this connection using the servers ID. The client attempts a direct connection first, if it fails n attempts it connects to the proxy server with its ID and the servers ID. The proxy then forwards messages as needed.

I don't believe this would be best method tho, and I don't know enough about managing these connections to make an informed decision.

Thanks in advance to anyone who chimes in, time to do some more research.