Forum Xamarin Xamarin.Android

Cannot recieve UDP data outside of LAN

Happy New Year All!

I wrote a program in visual studio that will send text via TCP and audio via UDP to my android program created in Xamarin. I am able to receive all data from the TCP server however I cannot listen to audio on UDP unless I am on my LAN. In wireshark I am able to verify that data is being sent to the correct address over UDP. Here are some snippets of the code.

Xamarin Code

          client = new UdpClient(port);
          client.BeginReceive (new AsyncCallback (recievedata), client);
          catch(Exception e){
              Console.WriteLine (e.ToString ());

Visual Studio C#

 server = new UdpClient(port);
 server.SendAsync(EncBuffer, EncBuffer.Length);
Sign In or Register to comment.