I used the Threaded Fortune Server as a base, and created a threaded echo server. While it compiles, it has a problem that I think is very basic/foundational. (It crashes when I write to the socket with a message about creating a thread for a different parent, but I won't get into that here).

In my single thread I connect a readyRead signal from the tcpsocket to a readCommand slot inside the same thread. From what I've read, you should not have a signal from inside a thread connect to a slot in the same thread. Is that right?

If that's the problem, how should I design this server? Do I have to create 2 threads for each connection? (One for when the incoming connection is established, and a second to read/write from that connection?) And how would I get the tcpSocket info passed from one thread to the other. Confused!!

Thanks!