there. I am currently making a python net-chat program of sorts. Currently it only works on a local network and cannot send messages to clients connected outside the network due to their router's firewall blocking the messages that are being sent to them.
So, my question is: How do messaging applications "bypass" firewalls to send messages to clients? Do they use something like "fetching" the information from the server and it tunnels the message back to them? But even that would use large amounts of battery if it was fetching every second. And fetching every minute is just impractical. I was thinking that they use more of a "push" protocol much like my IMAP server "pushes" my emails to my cellphone. But how do those connections go through the firewall?