File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 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 ();
You can’t perform that action at this time.
0 commit comments