Call ACK and NACK callbacks

This commit is contained in:
Marcin Gibula 2017-06-08 22:57:29 +02:00
parent f0712cfdc2
commit a28ea01f0e
2 changed files with 40 additions and 0 deletions

View File

@ -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;
}
};
/**

View File

@ -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;
}
};
/**