A
A
akass2015-05-24 23:26:05
Java
akass, 2015-05-24 23:26:05

How to use ReceiveAsync in xamarin?

Here is an example using udpclient from .net

private static void UDPListener()
{
    Task.Run(async () =>
    {
        using (var udpClient = new UdpClient(11000))
        {
            string loggingEvent = "";
            while (true)
            {
                //IPEndPoint object will allow us to read datagrams sent from any source.
                var receivedResults = await udpClient.ReceiveAsync();
                loggingEvent += Encoding.ASCII.GetString(receivedResults.Buffer);
            }
        }
    });
}

I would like to understand how to use an analogue from Java.Net.DatagramSocket.ReceiveAsync
Alas, an almost empty description of androidapi.xamarin.com/index.aspx?link=M%3AJava.Ne...
If not an example, then at least logic.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question