KZero Active Member Licensed User Longtime User Feb 23, 2015 #1 Hello, there is any way in B4A to open a UDP peer to peer connection across NAT ? thanks
thedesolatesoul Expert Licensed User Longtime User Feb 23, 2015 #2 You would need a third party public server somewhere for e.g. you can use GCM or alternative to pass the port information, and let both hosts start transmitting after that. Upvote 0
You would need a third party public server somewhere for e.g. you can use GCM or alternative to pass the port information, and let both hosts start transmitting after that.
KZero Active Member Licensed User Longtime User Feb 24, 2015 #3 thedesolatesoul said: You would need a third party public server somewhere for e.g. you can use GCM or alternative to pass the port information, and let both hosts start transmitting after that. Click to expand... knowing IP and port will not help to connect behind NAT , the both have to start the connection because they can't listen to incoming connections i have a detected server and i can write server application receive the connection from the both devices now do you have idea about how to merge this 2 connections together without needing the the server anymore ? thanks Upvote 0
thedesolatesoul said: You would need a third party public server somewhere for e.g. you can use GCM or alternative to pass the port information, and let both hosts start transmitting after that. Click to expand... knowing IP and port will not help to connect behind NAT , the both have to start the connection because they can't listen to incoming connections i have a detected server and i can write server application receive the connection from the both devices now do you have idea about how to merge this 2 connections together without needing the the server anymore ? thanks
T Troberg Well-Known Member Licensed User Longtime User Feb 24, 2015 #4 As I said in another thread, I don't think you can expect to do this through high level APIs. You'll have to dig deep and get dirty. Upvote 0
As I said in another thread, I don't think you can expect to do this through high level APIs. You'll have to dig deep and get dirty.
thedesolatesoul Expert Licensed User Longtime User Feb 24, 2015 #5 KZero said: knowing IP and port will not help to connect behind NAT , the both have to start the connection because they can't listen to incoming connections Click to expand... It will because it will open the ports on the local side. This means when the remote host transfers next it will find an open port on the outside. But there are other issues whether the outside ip/port is the same as the internal ip/port. Read THIS. It should help. Upvote 0
KZero said: knowing IP and port will not help to connect behind NAT , the both have to start the connection because they can't listen to incoming connections Click to expand... It will because it will open the ports on the local side. This means when the remote host transfers next it will find an open port on the outside. But there are other issues whether the outside ip/port is the same as the internal ip/port. Read THIS. It should help.