title: communicate between different network using java socket
body: <p>I've created a java chat application using java socket. It can communicate in local network, but if I use another network it doesn't work. I've tried by using public IP but it still not connected. 
  The chat application has a serverGUI and clientGUI so, I've started the serverGUI on PC by using its public IP. And then I've connected my Laptop connected in another network and tried to connect to the server by entering the PC's public IP but it not connected.</p>
  
  <p>I've been also told to use MQTT, but I haven't found a useful tutorial about it.
  I'm using MQTT Paho and use Node-Red</p>
  
  <p>Please help me to get communicated over different networks.</p>