1#include "OutStreamChannel.h"
4#include <QLoggingCategory>
6Q_DECLARE_LOGGING_CATEGORY(VncStreamChannel)
8COutStreamChannel::COutStreamChannel(
CChannel* pDataChannel)
9 : rdr::BufferedOutStream(),
10 m_pDataChannel(pDataChannel)
14bool COutStreamChannel::flushBuffer()
17 if(!m_pDataChannel || !m_pDataChannel->isOpen())
return false;
18 qint64 n = m_pDataChannel->write((
const char*)sentUpTo, ptr - sentUpTo);
25 qCritical(VncStreamChannel) <<
"COutStreamDataChannel::fillBuffer:"
26 << m_pDataChannel->errorString();
28 throw std::runtime_error(m_pDataChannel->errorString().toStdString());
The channel interface class.