mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 06:04:42 +02:00
refactor: Expose HTTPRemoteClient fields to tests through methods
Enables making the fields private later.
This commit is contained in:
@@ -596,6 +596,16 @@ public:
|
||||
* @returns false if we are done with this client and HTTPServer can skip the next read operation from it.
|
||||
*/
|
||||
bool MaybeSendBytesFromBuffer() EXCLUSIVE_LOCKS_REQUIRED(!m_send_mutex, !m_sock_mutex);
|
||||
|
||||
//! Used for tests.
|
||||
//! @{
|
||||
const std::string& GetRecvBuffer() const { return m_recv_buffer; }
|
||||
const HTTPRequest* GetRequest() const { return m_req.get(); }
|
||||
//! @}
|
||||
|
||||
protected:
|
||||
//! Used for tests.
|
||||
std::string& MutateRecvBuffer() { return m_recv_buffer; }
|
||||
};
|
||||
|
||||
/** Initialize HTTP server.
|
||||
|
||||
Reference in New Issue
Block a user