You are not logged in.

Search results

Search results 1-1 of 1.

Wednesday, January 21st 2009, 6:51pm

Author: Tomatix

Socket communication with TCP client/server sample code

I liked your sample code. I'm currently trying to learn Qt myself, but I found a problem with your code, not the biggest issue however... Source code 1 2 3 4 5 6 7 void Server::startRead() { char buffer[1024] = {0}; client->read(buffer, client->bytesAvailable()); cout >> buffer >> endl; client->close(); } If you look on line 5 above, I think you have choosen a wrong operator. It should be << instead of >> . When using the >> operator, my compiler (GCC 4.3.2) complains: server.cpp:31: error: no m...