Re: SDLNet(not getting packs with WAN IP but works fine with LAN

Alex Barry <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <CAJSO58MaKF+J2rB7VGLC_47ZrBF82S-YL6s5m7Ub2AchuCduLQ@mail.gmail.com>
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 <[email protected]> wrote:

> 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;
>
>
>
>
>
>
>
>
>
>
> MrOzBarry wrote:
>
> You might need to open/forward the port on your router.
> On Aug 20, 2016 12:46 AM, "Timodor" <> wrote:
>
>
>
> Quote:
>
> Hello,
>
> I can't seem to access my SDL Server via WAN IP address from the Client.
> But using a LAN address works perfectly fine.
> SDL server doesn't receive packets? What might be occurring?
>
>
> _______________________________________________
> SDL mailing list
>
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
>
>
>
>
> _______________________________________________
> SDL mailing list
> [email protected]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.