Example #1
0
        private async void ListenAsync()
        {
            var packet = await receiver.ReceiveAsync();

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

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