Deprecate ack(size_t len, uint32_t time)

This commit is contained in:
Mathieu Carbou
2024-09-04 12:11:11 +02:00
parent 5f26351296
commit 933aac8d3e
2 changed files with 4 additions and 4 deletions

View File

@@ -128,8 +128,7 @@ AsyncEventSourceMessage::~AsyncEventSourceMessage() {
free(_data);
}
size_t AsyncEventSourceMessage::ack(size_t len, uint32_t time) {
(void)time;
size_t AsyncEventSourceMessage::ack(size_t len) {
// If the whole message is now acked...
if (_acked + len > _len) {
// Return the number of extra bytes acked (they will be carried on to the next message)

View File

@@ -60,13 +60,14 @@ class AsyncEventSourceMessage {
uint8_t* _data;
size_t _len;
size_t _sent;
// size_t _ack;
size_t _acked;
public:
AsyncEventSourceMessage(const char* data, size_t len);
~AsyncEventSourceMessage();
size_t ack(size_t len, uint32_t time __attribute__((unused)));
[[deprecated("This function is deprecated and will be removed in future releases. Use ack(size_t len) instead")]]
size_t ack(size_t len, uint32_t time __attribute__((unused))) { return ack(len); }
size_t ack(size_t len);
size_t send(AsyncClient* client);
bool finished() { return _acked == _len; }
bool sent() { return _sent == _len; }