Ejemplo n.º 1
0
        private void ReceiveCallback(IAsyncResult result)
        {
            var endPoint  = LocalEndPoint;
            var bytes     = _client.EndReceive(result, ref endPoint);
            var eventArgs = new UdpReceivedEventArgs(bytes);

            OnMessageReceived?.Invoke(this, eventArgs);
            Receive();
        }
Ejemplo n.º 2
0
 private void ReceiveCallback(IAsyncResult result)
 {
     var endPoint = LocalEndPoint;
     var bytes = _client.EndReceive(result, ref endPoint);
     var eventArgs = new UdpReceivedEventArgs(bytes);
     OnMessageReceived?.Invoke(this, eventArgs);
     Receive();
 }