Many routers have a page you can connect to t log in and change settings. For most netgear routers, it's routerlogin.net - the user name is usually admin and the default password is generally on the router itself written down for you.
There are a number of things wrong with the program.
1. The indentation is not correct, making errors difficult to spot.
2. Only the server should bind to a port (so a client can find it).
3. You haven't specified what network the server listens on, I presume it's defaulting to all (INADDR_ANY), but you need to be clear on what's being used.
4. You should use the loopback address (localhost) to get your communications working then test against other addresses that your computer may have.
5. Love the magic numbers: 2056, 32701, 32704. What do they mean?
Thanks, fixed the indentation.
Right, but I commented out socket.bind(32704);, still not working.
How would I determine that?
The program works when I replace public IP with localhost or local IP.
Port 32701 and 32704 aren't reserved for anything according to wikipedia, and I just used them because I had already added a rule for ports 32700-32750 to my firewall. As for 2056.. I have no idea.
Port 32701 and 32704 aren't reserved for anything according to wikipedia, and I just used them because I had already added a rule for ports 32700-32750 to my firewall. As for 2056.. I have no idea.
You generally don't have to worry about that list on Wikipedia unless you want to develop an application designed to be running all the time like those other applications - e.g. you wouldn't want your commercial software to not work when the user has Skype running. In general you can use any port you want between 1 1025 and 65534.
kbw is saying though that you don't explicitly explain anywhere what those numbers are for. You can fix it simply by writing e.g.