Miss Engineer
3rd April 2014, 01:17
Hello,
I am a newbie to C++ and Qt and I'm working on a project using Qt now. I want to send a packet over the TCPSocket, the packet structure is as follows:
SYNC_WORD+RESERVE+PAYLOAD_LENGTH+PAYLOAD+ENDBYTE1+ ENDBYTE2
and size:
(1B)+(1B)+(2B)+(VAR B)+(1B)+(1B)
The payload is the contents of a QlineEdit
How do I do that? I have tried lots of alternatives, the last of which I defined the packet as an array of characters, but the RESERVE byte is currently 0x00 and it translates into NULL.
Any help would be appreciated.
I am a newbie to C++ and Qt and I'm working on a project using Qt now. I want to send a packet over the TCPSocket, the packet structure is as follows:
SYNC_WORD+RESERVE+PAYLOAD_LENGTH+PAYLOAD+ENDBYTE1+ ENDBYTE2
and size:
(1B)+(1B)+(2B)+(VAR B)+(1B)+(1B)
The payload is the contents of a QlineEdit
How do I do that? I have tried lots of alternatives, the last of which I defined the packet as an array of characters, but the RESERVE byte is currently 0x00 and it translates into NULL.
Any help would be appreciated.