mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
fixed SF# 1956300: HTTPServerConnection hanging
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// HTTPSession.h
|
||||
//
|
||||
// $Id: //poco/svn/Net/include/Poco/Net/HTTPSession.h#2 $
|
||||
// $Id: //poco/Main/Net/include/Poco/Net/HTTPSession.h#5 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
@@ -140,6 +140,9 @@ protected:
|
||||
|
||||
int receive(char* buffer, int length);
|
||||
/// Reads up to length bytes.
|
||||
|
||||
int buffered() const;
|
||||
/// Returns the number of bytes in the buffer.
|
||||
|
||||
StreamSocket& socket();
|
||||
/// Returns a reference to the underlying socket.
|
||||
@@ -208,6 +211,12 @@ inline const Poco::Exception* HTTPSession::networkException() const
|
||||
}
|
||||
|
||||
|
||||
inline int HTTPSession::buffered() const
|
||||
{
|
||||
return static_cast<int>(_pEnd - _pCurrent);
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user