Added socket lib strict mode spool, used in WebSocket::readFrame
This commit is contained in:
parent
829c8b7948
commit
fe6a0777a5
3 changed files with 6 additions and 6 deletions
|
|
@ -932,9 +932,9 @@ uint64_t Socket::Connection::dataDown(){
|
|||
|
||||
/// Updates the downbuffer internal variable.
|
||||
/// Returns true if new data was received, false otherwise.
|
||||
bool Socket::Connection::spool(){
|
||||
bool Socket::Connection::spool(bool strictMode){
|
||||
/// \todo Provide better mechanism to prevent overbuffering.
|
||||
if (downbuffer.size() > 10000){
|
||||
if (!strictMode && downbuffer.size() > 10000){
|
||||
return true;
|
||||
}else{
|
||||
return iread(downbuffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue