obi
19th October 2009, 20:33
Hello,
I need a simple Http Server. I found the following example:
http://doc.trolltech.com/solutions/4/qtservice/qtservice-example-server.html
Until now, the Code is pretty much the same, but I created a for every incoming connection a QThread which has a QTcpSocket Object.
My problem is: When I start my Server and open the ip and port with my browser, the browser should send a GET request which I want to read with the readClient() function. My problem is: I can write to my socket and send something back to the browser that is no problem, but there is never a readyRead() signal emitted and there is no data to read. There should be at least the GET request in the QTcpSocket or am I wrong? Is there anything I have to care about when I use Threads with QTcpSocket?
I hope I could describe my problem. If not, I'll see that I could get some Code the next days... It's at work.
Thanks in advance
I need a simple Http Server. I found the following example:
http://doc.trolltech.com/solutions/4/qtservice/qtservice-example-server.html
Until now, the Code is pretty much the same, but I created a for every incoming connection a QThread which has a QTcpSocket Object.
My problem is: When I start my Server and open the ip and port with my browser, the browser should send a GET request which I want to read with the readClient() function. My problem is: I can write to my socket and send something back to the browser that is no problem, but there is never a readyRead() signal emitted and there is no data to read. There should be at least the GET request in the QTcpSocket or am I wrong? Is there anything I have to care about when I use Threads with QTcpSocket?
I hope I could describe my problem. If not, I'll see that I could get some Code the next days... It's at work.
Thanks in advance