Go to the documentation of this file.
13 #ifndef BUFFEREDSOCKETDEVICE_H
14 #define BUFFEREDSOCKETDEVICE_H
22 #include <QHostAddress>
28 #include "msocketdevice.h"
63 bool bTakeOwnership =
false );
73 bool Connect (
const QHostAddress &addr,
79 bool At ( qlonglong index );
83 qulonglong
WaitForMore ( std::chrono::milliseconds msecs,
103 QString
ReadLine ( std::chrono::milliseconds msecs );
107 quint16
Port ()
const;
119 #endif // BUFFEREDSOCKETDEVICE_H
bool m_bHandleSocketDelete
qulonglong BytesAvailable()
bool Connect(const QHostAddress &addr, quint16 port)
MSocketDevice * m_pSocket
void SetReadBufferSize(qulonglong bufSize)
qlonglong WriteBlock(const char *data, qulonglong len)
QHostAddress m_destHostAddress
qulonglong m_nMaxReadBufferSize
QHostAddress Address() const
qlonglong ReadBlock(char *data, qulonglong maxlen)
virtual ~BufferedSocketDevice()
void SetDestAddress(QHostAddress hostAddress, quint16 nPort)
qlonglong WriteBlockDirect(const char *data, qulonglong len)
qulonglong WaitForMore(std::chrono::milliseconds msecs, bool *timeout=nullptr)
BufferedSocketDevice(int nSocket)
QHostAddress PeerAddress() const
MSocketDevice * SocketDevice()
bool ConsumeWriteBuf(qulonglong nbytes)
qint64 m_nWriteSize
write total buf size
qint64 m_nWriteIndex
write index
qulonglong ReadBufferSize() const
void SetSocketDevice(MSocketDevice *pSocket)
std::deque< QByteArray * > m_bufWrite
qulonglong BytesToWrite() const