[PyQt] QtNetwork newbie question
john.stewart at insomniafilm.com
Sun Mar 18 20:40:49 GMT 2012
I am trying to write a distributed render manager. The sever would be waiting for incoming connections (other CPUs wishing to be part of the machine pool) and then issue commands to be run on those other CPUs when a job is run in the manager via a user.
So far, this is what I am using to listen for connections and return their.
self.tcpServer = QtNetwork.QTcpServer()
self.connect(self.tcpServer, QtCore.SIGNAL("newConnection()"), self.newConnectionArrives )
self.sock = self.tcpServer.nextPendingConnection()
self.connect(self.sock, QtCore.SIGNAL("readyRead()"), self.tcpSocketReadyReadEmitted)
data = str(self.sock.readAll())
When I try and have two separate clients connect, the first client is ignored and only the second's data is received. Am I going about this the wrong way for multiple client connections or is there just something I am missing?
More information about the PyQt