Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / help for UDP connection with public ip

Author
Message
motran
13
Years of Service
User Offline
Joined: 4th Dec 2008
Location: Corse
Posted: 27th Jul 2022 22:14
hello
I want to connect my pc program with the same app but in mobile version (android).
I wanted to make them communicate together through the UDP functions available on AGK.
Communication must take place on the internet with a public IP, not in a local network.
I found the public ip of the pc and I created a network but I can not connect them together.

Please, could you explain to me with some examples how I can do ?

I apologize for the spelling mistakes, but I am Italian.
SFSW
19
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 27th Jul 2022 22:52
Since there are no NAT punch-through options in AGK/S, you'll likely need to manually forward the required port(s) at your router level to the local IP address of the PC as host (since you mentioned working with the public IP of the PC and creating a network with that). This is not done at the code level, so no sample can be provided. You need to log in to your router as admin and change port settings to forward as needed there. Make sure to specify the UDP protocol and forward to the LAN IP of the PC you are hosting with. Once that's done and the listener is active on the PC, you should then be able to connect with your Android device using the public IP address of the PC (the router will then forward the packet traffic as needed to the LAN IP on the specified port(s)). If the listening port is available on the Android device, then the PC will be able to communicate back. Otherwise, you may need to manually open a port there also.

Login to post a reply

Server time is: 2022-08-09 09:28:34
Your offset time is: 2022-08-09 09:28:34