SDLNet(not getting packs with WAN IP but works fine with LAN |
SDLNet(not getting packs with WAN IP but works fine with LAN |
MrOzBarry
|
You might need to open/forward the port on your router.
On Aug 20, 2016 12:46 AM, "Timodor" wrote:
|
|||||||||||||
|
Re: SDLNet(not getting packs with WAN IP but works fine with |
Timodor
|
I ended up creating an SDL Net Server on Windows thinking it was Android Limitation. I opened the port on the Windows FireWall and Port Forward the Modem, still no luck.
I have no idea. IPaddress client::ResolveHost(char* address, int port) { IPaddress serverAddress; /* Resolve server name */ //if (SDLNet_ResolveHost(&serverAddress, address, port)) //WAS 127.0.0.1 if (SDLNet_ResolveHost(&serverAddress, "WAN ADDRESS", 2000)) //WAS 127.0.0.1 { //fprintf(stderr, "SDLNet_ResolveHost(%s %d): %s\n", argv[1], atoi(argv[2]), SDLNet_GetError()); //exit(EXIT_FAILURE); } return serverAddress; } This How the Client is setting to Connect, but if the WAN ADDRESS is replaced with LAN Address it works This is Server Address IPaddress serverAddress; /* Resolve server name */ //if (SDLNet_ResolveHost(&serverAddress, address, port)) //WAS 127.0.0.1 if (SDLNet_ResolveHost(&serverAddress, NULL, port)) //WAS 127.0.0.1 { //fprintf(stderr, "SDLNet_ResolveHost(%s %d): %s\n", argv[1], atoi(argv[2]), SDLNet_GetError()); //exit(EXIT_FAILURE); } return serverAddress;
|
|||||||||||||||
|
SDLNet(not getting packs with WAN IP but works fine with LAN |
MrOzBarry
|
You might want to try a port scan or something like http://www.canyouseeme.org/ (I don't know how legit that site is, so use that at your own risk, I guess.) to ensure your port is open to the internet.
I guess if that's not the issue, the next step has to include sharing your your server/client code, since the code you provided is just outputting your ip address. On Sat, Aug 20, 2016 at 6:27 AM, Timodor wrote:
|
|||||||||||||
|
Hello |
Timodor
|
I kinda sorted it now, the issue is I can't use my own network to connect to the WAN IP, but an outside device can. EG I enabled my Data on my Phone and it connected to both my new Windows Dedicated Server and Server on the Android Device. Thats the whole purpose of the server outside access. But I guess connecting to it from the inside might be some type of loopback issue.
Cheers Barry thanks for eagerness to help |
|||||||||||
|
SDLNet(not getting packs with WAN IP but works fine with LAN |
MrOzBarry
|
Well, if you can use your data on your android device, then your router is blocking the port, but it sounds like your code is good, so carry on
On Sat, Aug 20, 2016 at 10:52 AM, Timodor wrote:
|
|||||||||||||
|
MrTAToad
|
Dont forget on a Linux device port numbers below a certain range can only be used with root access...
|
|||||||||||
|
Re: SDLNet(not getting packs with WAN IP but works fine with |
Timodor
|
The Port is fine I think, using 2500, My Phone has connect through my IP ADSL connection, through my router and can access Deciated Server and Android Device. My phone is going through 4G service.
The only issue why can't I go out and back in using my ADSL connection
|
|||||||||||||||
|