Sockets Xamarin Android

0

I wanted to ask you, yes Does Xamarin Android support System.Net.Sockets'?

I have tried it in the following way (this is a part of the code)

IPAddress ipAd = IPAddress.Parse("192.168.1.4");
     // use local m/c IP address, and 
     // use the same in the client
/* Initializes the Listener */
    TcpListener myList=new TcpListener(ipAd,5555);

/* Start Listeneting at the specified port */        
    myList.Start();

But the application on the cell phone closes unexpectedly.

Help me please, I would appreciate it.

    
asked by Javier 27.03.2017 в 04:38
source

1 answer

0

In your Android application you need to modify the Android Manifest and enable the INTERNET permission so that the sockets work.

Otherwise the application will be closing spontaneously when initializing the socket.

    
answered by 27.03.2017 в 16:55