MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / writeData

Method writeData

Src/Channel/Channel.cpp:53–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53qint64 CChannel::writeData(const char *data, qint64 len)
54{
55 //qDebug(log) << Q_FUNC_INFO << len;
56 if(nullptr == data || 0 > len) {
57 qCritical(log) << Q_FUNC_INFO << "The parameters is invalid" << len;
58 return -1;
59 }
60
61 if(0 == len) {
62 qDebug(log) << Q_FUNC_INFO << "len:" << len;
63 return 0;
64 }
65
66 qint64 nRet = 0;
67 if(!m_pSocket) return nRet;
68 nRet = m_pSocket->write(data, len);
69 if(nRet < 0)
70 setErrorString(m_pSocket->errorString());
71 else
72 emit sigSend(nRet);
73 return nRet;
74}
75
76bool CChannel::isSequential() const
77{

Callers

nothing calls this directly

Calls 2

writeMethod · 0.80
errorStringMethod · 0.80

Tested by

no test coverage detected