getBufferedAmount should only see totalLength
This commit is contained in:
+2
-1
@@ -134,7 +134,8 @@ protected:
|
|||||||
|
|
||||||
/* Returns the user space backpressure. */
|
/* Returns the user space backpressure. */
|
||||||
unsigned int getBufferedAmount() {
|
unsigned int getBufferedAmount() {
|
||||||
return (unsigned int) getAsyncSocketData()->buffer.size();
|
/* We return the actual amount of bytes in backbuffer, including pendingRemoval */
|
||||||
|
return (unsigned int) getAsyncSocketData()->buffer.totalLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the text representation of an IPv4 or IPv6 address */
|
/* Returns the text representation of an IPv4 or IPv6 address */
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ struct BackPressure {
|
|||||||
size_t size() {
|
size_t size() {
|
||||||
return length();
|
return length();
|
||||||
}
|
}
|
||||||
|
/* The total length, incuding pending removal */
|
||||||
|
size_t totalLength() {
|
||||||
|
return buffer.length();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Depending on how we want AsyncSocket to function, this will need to change */
|
/* Depending on how we want AsyncSocket to function, this will need to change */
|
||||||
|
|||||||
Reference in New Issue
Block a user