internal async ValueTask ProcessBasic(RabbitMQProtocolReader protocol, FrameHeader header, MethodHeader method, CancellationToken token = default)
        {
            switch (method.MethodId)
            {
            case 60:     //deliver method
            {
                var deliver = await protocol.ReadBasicDeliverAsync(token).ConfigureAwait(false);

                await _channelHandler.OnBeginDeliveryAsync(header.Channel, deliver, protocol).ConfigureAwait(false);

                break;
            }

            case 21:     // consume-ok
            {
                var tag = await protocol.ReadBasicConsumeOkAsync(token).ConfigureAwait(false);;
                await _channelHandler.OnConsumeOkAsync(header.Channel, tag).ConfigureAwait(false);

                break;
            }

            case 11:     // qos-ok
            {
                var qosOk = await protocol.ReadBasicQoSOkAsync(token).ConfigureAwait(false);

                await _channelHandler.OnQosOkAsync(header.Channel).ConfigureAwait(false);

                break;
            }

            case 31:     //consumer cancel-ok
            {
                var tag = await protocol.ReadBasicConsumeCancelOkAsync(token).ConfigureAwait(false);

                await _channelHandler.OnConsumeCancelOkAsync(header.Channel, tag).ConfigureAwait(false);

                break;
            }

            case 30:
            {
                var cancelInfo = await protocol.ReadBasicConsumeCancelAsync(token).ConfigureAwait(false);

                await _channelHandler.OnConsumeCancelAsync(header.Channel, cancelInfo);

                break;
            }

            default:
                throw new RabbitMQMethodException(nameof(ProcessBasic), method.ClassId, method.MethodId);
            }
        }