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); } }
protected Task NextAsync(object request) { return(nextHandler?.HandleAsync(request) ?? Task.CompletedTask); }