<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. 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> factory = ClientFactory()<br> factory.protocol = caller<br> factory.message = self.message<br> factory.alive = 0<br> reactor.connectTCP(self.ip, self.port, factory)<br><br>and wait on the response. This is done from within an application daemon, so no reactor.run() is required. <br><br>How can I send a message out and wait for the response before proceeding? I tried using deferreds a bunch of different ways but I
can't seem to get it going. <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>