0
Looks like it is IP and port issue. As you have not posted your code, it is difficult to say anything. Do have a look at below link, if it can help you:
https://stackoverflow.com/questions/36585433/client-server-connection-does-not-work-through-internet