Revert "Deprecate ack(size_t len, uint32_t time)"

This reverts commit 933aac8d3e.
This commit is contained in:
Mathieu Carbou
2024-09-04 12:16:00 +02:00
parent 933aac8d3e
commit 706e5107e0
2 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -60,14 +60,13 @@ class AsyncEventSourceMessage {
uint8_t* _data; uint8_t* _data;
size_t _len; size_t _len;
size_t _sent; size_t _sent;
// size_t _ack;
size_t _acked; size_t _acked;
public: public:
AsyncEventSourceMessage(const char* data, size_t len); AsyncEventSourceMessage(const char* data, size_t len);
~AsyncEventSourceMessage(); ~AsyncEventSourceMessage();
[[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)));
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); size_t send(AsyncClient* client);
bool finished() { return _acked == _len; } bool finished() { return _acked == _len; }
bool sent() { return _sent == _len; } bool sent() { return _sent == _len; }