private async void ListenUdpLoop() { bool udpListenerActive = true; while (udpListenerActive) { //wait until signal is recieved UdpSocketMessageReceivedEventArgs udpMsg = await MessageReceivedUdp(); IncomingMsg?.Invoke(this, new MsgReceivedEventArgs(udpMsg.RemoteAddress, udpMsg.ByteData, TransportType.UDP)); } }
private async void ListenUdpLoop() { bool udpListenerActive = true; while (udpListenerActive) { //wait until signal is recieved UdpSocketMessageReceivedEventArgs udpMsg = await MessageReceivedUdp(); if (ca != null) { IncomingMsg?.Invoke(this, new MsgReceivedEventArgs(udpMsg.RemoteAddress, udpMsg.ByteData, TransportType.UDP)); } else //catch (System.MissingMethodException e0) { IncomingMsg2?.Invoke(this, new MsgReceivedEventArgs(udpMsg.RemoteAddress, udpMsg.ByteData, TransportType.UDP)); } //catch (Exception e) //{ // throw e; //} } }