PDA

View Full Version : Sending string from QT client to Java server



seanmu13
2nd July 2007, 13:21
I am trying to send a string from my QT client to a Java server. I am able to get them connected, verified both with the QT and Java programs. However, I am not able to send a string over the socket, nothing gets passed to the server. I tried using a QTextStream with no luck. Can anybody help?

zlatko
2nd July 2007, 13:28
Some code ?

seanmu13
2nd July 2007, 13:31
QTcpSocket socket(this);
socket.connectToHost(QHostAddress::LocalHost,50000 ,QIODevice::WriteOnly);
socket.waitForConnected(1);
//socket.write("sfsdfsadfsdf");

QTextStream out(&socket);
out << "Some Text";

wysota
3rd July 2007, 12:20
Isn't this a double thread?