First of all be aware that if your data structure contains any pointers or non-POD objects (like classes), you will receive garbage on the receiving end.
Now that you have been warned...
The easiest way to do what you want is:
Qt Code:
socket->write((const char*)&myOwnBuffer, myOwnBufferSize);To copy to clipboard, switch view to plain text mode
Bookmarks