Skip to content

Commit

Permalink
Remove unused BackPressure calls
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed Jan 27, 2025
1 parent 8e2a5e3 commit af39093
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/AsyncSocketData.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Authored by Alex Hultman, 2018-2021.
* Authored by Alex Hultman, 2018-2025.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -44,23 +44,23 @@ struct BackPressure {
size_t length() {
return buffer.length() - pendingRemoval;
}
/* Only used in AsyncSocket::write - what about replacing it with the other functions like erase(length())? */
void clear() {
pendingRemoval = 0;
buffer.clear();
buffer.shrink_to_fit();
}
/* Only used by AsyncSocket::write (optionally) before append */
void reserve(size_t length) {
buffer.reserve(length + pendingRemoval);
}
/* Only used by getSendBuffer as last resort */
void resize(size_t length) {
buffer.resize(length + pendingRemoval);
}
const char *data() {
return buffer.data() + pendingRemoval;
}
size_t size() {
return length();
}
/* The total length, incuding pending removal */
size_t totalLength() {
return buffer.length();
Expand Down

0 comments on commit af39093

Please sign in to comment.