Niunzin
6th January 2014, 16:48
Hi, i'm new in qt and i don't know how to send bytes D:
I want to follow this protocol:
C: 04
CC: 04
Name: THREAD_REPLY
Format (Sent): thread_id (int), message [short, string]
I tried it, but doesnt worked:
QByteArray reply;
reply[0] = 0x00;
reply[1] = 0x00;
reply[2] = 0x00;
reply[3] = 0x2f;
reply[4] = 0x04;
reply[5] = 0x04;
reply[6] = 0x00;
reply[7] = 572436;
reply[8] = 0x00;
reply[9] = 0x00;
reply[10] = 0x00;
reply[11] = ui->lineEdit->text().toUtf8();
sendPacket(reply);
http://img560.imageshack.us/img560/2060/6k72.png
Thanks!
I want to follow this protocol:
C: 04
CC: 04
Name: THREAD_REPLY
Format (Sent): thread_id (int), message [short, string]
I tried it, but doesnt worked:
QByteArray reply;
reply[0] = 0x00;
reply[1] = 0x00;
reply[2] = 0x00;
reply[3] = 0x2f;
reply[4] = 0x04;
reply[5] = 0x04;
reply[6] = 0x00;
reply[7] = 572436;
reply[8] = 0x00;
reply[9] = 0x00;
reply[10] = 0x00;
reply[11] = ui->lineEdit->text().toUtf8();
sendPacket(reply);
http://img560.imageshack.us/img560/2060/6k72.png
Thanks!