QTcpServer, multi-threads VS multi-processes
-
Hi all,
I have an application that handles every new tcp connection with a new thread. I get this by sub-classing QTcpServer::incomingConnection as usual and passing the QTcoSocket to a new thread.Now I'd like to have a new process for every socket. This way if one of the processes crashes (I'd like it never happens ) I get the others running.
The problem is that I don't understand how to pass the socket to a new process...
Do you think it's possible?
-
Socket end point is local kernel/tcp-ip resource. This can't be passed across the process address space. I think your idea is to provide High availability. You need to look for other mechanism for doing your objective.
-
What do you think about "fork" my application for every client connection?
Have someone already tried?
It seems Apache works like this.