Skip to content

Commit af39093

Browse files
committed
Remove unused BackPressure calls
1 parent 8e2a5e3 commit af39093

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/AsyncSocketData.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Authored by Alex Hultman, 2018-2021.
2+
* Authored by Alex Hultman, 2018-2025.
33
* Intellectual property of third-party.
44
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -44,23 +44,23 @@ struct BackPressure {
4444
size_t length() {
4545
return buffer.length() - pendingRemoval;
4646
}
47+
/* Only used in AsyncSocket::write - what about replacing it with the other functions like erase(length())? */
4748
void clear() {
4849
pendingRemoval = 0;
4950
buffer.clear();
5051
buffer.shrink_to_fit();
5152
}
53+
/* Only used by AsyncSocket::write (optionally) before append */
5254
void reserve(size_t length) {
5355
buffer.reserve(length + pendingRemoval);
5456
}
57+
/* Only used by getSendBuffer as last resort */
5558
void resize(size_t length) {
5659
buffer.resize(length + pendingRemoval);
5760
}
5861
const char *data() {
5962
return buffer.data() + pendingRemoval;
6063
}
61-
size_t size() {
62-
return length();
63-
}
6464
/* The total length, incuding pending removal */
6565
size_t totalLength() {
6666
return buffer.length();

0 commit comments

Comments
 (0)