Use QDataStream to implement a real protocol. Have a look at the Fortune Client example.
Use QDataStream to implement a real protocol. Have a look at the Fortune Client example.
Hey,
Oh okay. I was looking through that but I was also wondering would it be possible to use QTcpSocket and QNetwork to connect to another program using TCP connection that is written in C++ but not with QT sending the integer array? And if so, would you be able to provide an example coding of it?
Thanks,
Strateng
You can access the data like this if both systems have the same endianess.
Qt Code:
int* data = reinterpret_cast<int*>(buffer);To copy to clipboard, switch view to plain text mode
Bookmarks