mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 08:04:14 +02:00
Add cork
This commit is contained in:
parent
254bd108df
commit
7d103aaf1b
@ -91,6 +91,16 @@ bool Stream::WaitForData(int timeout)
|
|||||||
return IsDataAvailable() || IsEof();
|
return IsDataAvailable() || IsEof();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Stream::SetCorked(bool corked)
|
||||||
|
{
|
||||||
|
m_Corked = corked;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Stream::IsCorked() const
|
||||||
|
{
|
||||||
|
return m_Corked;
|
||||||
|
}
|
||||||
|
|
||||||
static void StreamDummyCallback()
|
static void StreamDummyCallback()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@ -127,6 +127,9 @@ public:
|
|||||||
bool WaitForData();
|
bool WaitForData();
|
||||||
bool WaitForData(int timeout);
|
bool WaitForData(int timeout);
|
||||||
|
|
||||||
|
virtual void SetCorked(bool corked);
|
||||||
|
bool IsCorked() const;
|
||||||
|
|
||||||
virtual bool SupportsWaiting() const;
|
virtual bool SupportsWaiting() const;
|
||||||
|
|
||||||
virtual bool IsDataAvailable() const;
|
virtual bool IsDataAvailable() const;
|
||||||
@ -143,6 +146,8 @@ private:
|
|||||||
|
|
||||||
boost::mutex m_Mutex;
|
boost::mutex m_Mutex;
|
||||||
boost::condition_variable m_CV;
|
boost::condition_variable m_CV;
|
||||||
|
|
||||||
|
bool m_Corked{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user