private async void ListenAsync()
        {
            var packet = await receiver.ReceiveAsync();

            ListenAsync();
            await handler.HandleAsync(packet);
        }
        public async Task HandleAsync(Packet packet)
        {
            var handleSuccess = await TryHandleAsync(packet);

            if (!handleSuccess && successor != null)
            {
                await successor.HandleAsync(packet);
            }
        }
Exemple #3
0
 protected Task NextAsync(object request)
 {
     return(nextHandler?.HandleAsync(request) ?? Task.CompletedTask);
 }