2

I have a problem using GCDAsyncUdpSocket over internet. Everything works fine when I am doing test on my local computer.

I try to to send UDP message between a computer connected to internet with a 3G key and an Ipod connected through wifi. Unfortunately the message are not transmitted. I tried to do the same test with the example of GCDAsyncUdpSocket : UdpEchoClient and UdpEchoServer, and it is also not working.

To know the address IP of my computer with the 3G key, I looked on system preferences -> network, I also looked on http://whatismyipaddress.com/ , I saw that the adresses were different. With both it is not working.

My Ipod connected through wifi is behind a NAT/Firewall, but according to this website : https://www.gotroot.com/blogpost4-Why-your-should-never-forward-UDP-out-of-your-firewall It shouldnt be a problem.

Is it possible to send message between 2 devices without opening any port? Why do you have two different IP addresses on my computer with 3G?

Jimmydgb
  • 21
  • 1
  • The problem is that neither machine has the ability to receive a packet that is not part of an established connection. Making this work requires advanced networking knowledge and the use of a server that the two clients can use to find each other. Take a look at [STUN](http://en.wikipedia.org/wiki/STUN). For a robust solution, you should be prepared to fall back to using the server as a repeater to proxy between the two clients and you should be prepared to fall back to TCP if UDP proves unusable. – David Schwartz May 13 '12 at 11:23

0 Answers0