351 # If we already have a connection, refuse this one. It will be closed |
351 # If we already have a connection, refuse this one. It will be closed |
352 # automatically. |
352 # automatically. |
353 if self.qsock is not None: |
353 if self.qsock is not None: |
354 return False |
354 return False |
355 |
355 |
356 self.connect(sock, SIGNAL('disconnected()'), self.debugServer.startClient) |
356 sock.disconnected[()].connect(self.debugServer.startClient) |
357 self.connect(sock, SIGNAL('readyRead()'), self.__parseClientLine) |
357 sock.readyRead[()].connect(self.__parseClientLine) |
358 |
358 |
359 self.qsock = sock |
359 self.qsock = sock |
360 |
360 |
361 # Get the remote clients capabilities |
361 # Get the remote clients capabilities |
362 self.remoteCapabilities() |
362 self.remoteCapabilities() |
383 return |
383 return |
384 |
384 |
385 # do not want any slots called during shutdown |
385 # do not want any slots called during shutdown |
386 self.disconnect(self.qsock, SIGNAL('disconnected()'), |
386 self.disconnect(self.qsock, SIGNAL('disconnected()'), |
387 self.debugServer.startClient) |
387 self.debugServer.startClient) |
388 self.disconnect(self.qsock, SIGNAL('readyRead()'), self.__parseClientLine) |
388 self.qsock.readyRead[()].disconnect(self.__parseClientLine) |
389 |
389 |
390 # close down socket, and shut down client as well. |
390 # close down socket, and shut down client as well. |
391 self.__sendCommand('{0}\n'.format(RequestShutdown)) |
391 self.__sendCommand('{0}\n'.format(RequestShutdown)) |
392 self.qsock.flush() |
392 self.qsock.flush() |
393 |
393 |