PDA

View Full Version : Help on QTcpSocket, QTService and QThread



josecarlosmissias
3rd November 2009, 19:35
Hello all

I'm trying to create a simple solution using QTcpSocket, QTService and QThread, but I'm not having much success. The purpose of this solution is as follows:

Server
Windows service that receives client connections to receive txt files.

Client
Application that connects to the server application to send a txt file.

Any help is welcome.

JohannesMunk
12th November 2009, 16:37
Quite a long while back I wrote a Client Server Protocol, that allows for some latency aware transfer. Just ignore all that stuff and you will find some tcpsockets in threads in there.

I remember, that it took me a long while before I could figure some of the stuff out.

Hope it helps to understand how that stuff works and doesn't confuse too much!

Another starting point might be:
http://doc.trolltech.com/4.5/network-threadedfortuneserver.html

Both examples are not services, though.. But I would start to implement the server as a normal application and make it a service later.

Let us know if you have any more specific problems.

Johannes