Thanks for the reply.
Could You please clarify and point me in the right direction?
I think I got You about building “bridge” so let me try to explain further more.
I’m working on a turn based 1v1 online game which includes match-making. So I have a server which creates an instance of ‘match’ class for every match (I’m only pointing this out so You’d understand why did I decide to use this kind of communication structure). The server also includes a listener class which receives data (on a specific port) from players and also sends data to them (mobile devices). So once again, it looks like this: device1 <data> SERVER(listener) <data> device2. Therefore the server receives data from device1 and then (the server) sends data to device2 or vice versa. So in here, the server (listener) would be a bridge like You said. I configured the server so it may receive data on a specific port (portforwarding) - naturally, the server receives data when I send it to the server’s public IP, however, clients don’t receive data when I send it to their public IP and that’s my problem - why don’t clients (mobile devices) receive data (well, I do know an answer to that but how should I fix it)?
The server listener, listener on mobile devices, match-making - it’s all done and tested locally (where it works), however testing on public causes problems on client-side (not receiving data).
As for not using UDP protocol - I also thought this might be a problem so I tried switching to TCP but it doesn’t work either (I get a message “No connection could be made because the target machine actively refused it.”).
I know I’m missing something in the whole story but I’m just not sure what would it be? -is it a method I use or something else?
I don’t want players to turn their firewall off or whatsoever - I want them to install the game and be able to play it online straight away just like people install Skype and may chat immediately.
Best regards,
Tomislav