[SOLVED] Testing my UDP connection.

[THIS IS ALREADY SOLVED]

So um, I’m trying to make a simple server here and check if it works from others computers. When I do “localhost” as ip, i can connect. But when I type in my public ip, it won’t work. I figured it might be port forwarding problem, or just that I cannot connect to myself through public ip.

Here is the source code:

ON SOME MODEMS YOU CAN’T CONNECT TO YOUR MODEM WITH YOUR PUBLIC IP. ONLY WITH ‘localhost’