Exemplo n.º 1
0
        public void Listen()
        {
            IsListening = true;

            new Thread(async() =>
            {
                while (IsListening)
                {
                    if (SocketController.IsConnected)
                    {
                        Payload payload = await SocketController.Receive();
                        if (payload != null)
                        {
                            PayloadReceived(payload);
                        }
                    }
                }
            }).Start();
        }
Exemplo n.º 2
0
 public async Task <Payload> Receive()
 {
     return(await SocketController.Receive());
 }