diff --git a/src/basicackframe.h b/src/basicackframe.h index 1f3c577..9d10e13 100644 --- a/src/basicackframe.h +++ b/src/basicackframe.h @@ -110,6 +110,26 @@ public: { return _multiple.get(0); } + + /** + * Process the frame + * @param connection The connection over which it was received + * @return bool Was it succesfully processed? + */ + virtual bool process(ConnectionImpl *connection) override + { + // we need the appropriate channel + auto channel = connection->channel(this->channel()); + + // channel does not exist + if(!channel) return false; + + // start message counter + channel->reportAck(deliveryTag(), multiple()); + + // done + return true; + } }; /** diff --git a/src/basicnackframe.h b/src/basicnackframe.h index 89344fe..f6e5fc1 100644 --- a/src/basicnackframe.h +++ b/src/basicnackframe.h @@ -108,6 +108,26 @@ public: { return _bits.get(1); } + + /** + * Process the frame + * @param connection The connection over which it was received + * @return bool Was it succesfully processed? + */ + virtual bool process(ConnectionImpl *connection) override + { + // we need the appropriate channel + auto channel = connection->channel(this->channel()); + + // channel does not exist + if(!channel) return false; + + // start message counter + channel->reportNack(deliveryTag(), multiple(), requeue()); + + // done + return true; + } }; /**