Hi at all!,
I want to write (an after read) an bytes array to the TCP socket.
I try with this code:
Qt Code:
QByteArray block; out << quint16(0) << variable; out.device()->seek(0); out << quint16(block.size() - sizeof(quint16)); tcpSocket.write(block);To copy to clipboard, switch view to plain text mode
this code work, but the problem is that I not read only "CIAO" on my receiver program.
I'm waiting to receive 6 bytes... "04CIAO"
I must change the variable type?
nowire
Bookmarks