in order to do something like that you would need a connection manager/appliance like the
WanScaler. essentially it would handle all your connects for you and always tell you, you are connected, please wait. and when you connection dies it will still say please wait till you are connected again and then it pass the server traffic to you. i believe you can run one of these on a raspberry pi now a days. good luck with that 300 to 600 ms!!!