<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi,<br><br>I have a server which can handle multiple connections.&nbsp; At any given time, I want to send out a ping to see who is still listening to this server.<br><br>For this I scan through my list of ip's and send out a msg with<br><br>&nbsp;&nbsp;&nbsp;&nbsp; factory = ClientFactory()<br>&nbsp;&nbsp;&nbsp;&nbsp; factory.protocol = caller<br>&nbsp;&nbsp;&nbsp;&nbsp; factory.message = self.message<br>&nbsp;&nbsp;&nbsp;&nbsp; factory.alive = 0<br>&nbsp;&nbsp;&nbsp;&nbsp; reactor.connectTCP(self.ip, self.port, factory)<br><br>and wait on the response.&nbsp; This is done from within an application daemon, so no reactor.run() is required.&nbsp; <br><br>How can I send a message out and wait for the response before proceeding?&nbsp; I tried using deferreds a bunch of different ways but I
 can't seem to get it going.&nbsp; <br>Oh and I should clarify I want the response to be in the original stream, not in the thread created by connectTCP/dataReceived/etc...<br><br>thanks,<br><br>Nima<br></div></div></body></html>