Updated to ack(size_t len, uint32_t time = 0);

This commit is contained in:
Mathieu Carbou
2024-09-04 13:06:21 +02:00
parent 4c4c97ecb7
commit 675aba89e4
2 changed files with 2 additions and 3 deletions

View File

@@ -128,8 +128,7 @@ AsyncEventSourceMessage::~AsyncEventSourceMessage() {
free(_data); free(_data);
} }
size_t AsyncEventSourceMessage::ack(size_t len, uint32_t time) { size_t AsyncEventSourceMessage::ack(size_t len, __attribute__((unused)) 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

@@ -66,7 +66,7 @@ class AsyncEventSourceMessage {
public: public:
AsyncEventSourceMessage(const char* data, size_t len); AsyncEventSourceMessage(const char* data, size_t len);
~AsyncEventSourceMessage(); ~AsyncEventSourceMessage();
size_t ack(size_t len, uint32_t time __attribute__((unused))); size_t ack(size_t len, uint32_t time = 0);
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; }