mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
additonal fix for GH #1212: WebSocketImpl::available() now reports number of bytes in internal buffer.
This commit is contained in:
@@ -375,7 +375,11 @@ Poco::Timespan WebSocketImpl::getReceiveTimeout()
|
||||
|
||||
int WebSocketImpl::available()
|
||||
{
|
||||
return _pStreamSocketImpl->available();
|
||||
int n = _buffer.size() - _bufferOffset;
|
||||
if (n > 0)
|
||||
return n + _pStreamSocketImpl->available();
|
||||
else
|
||||
return _pStreamSocketImpl->available();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user