On 07/20/2012 04:26 AM, Luka Rahne wrote: > for each line in sx: > encode line whit extra data in packet (packet is like len + encrypted_) > Send packet over UDP (tcp not supported) > wait for ACK ("OK" packet in my example) > wait for 0.05 s (not in included example) > > > I done some code that should support this and i have tried to stop > protocol but calling self.doStop() function > (twisted.internet.protocol.AbstractDatagramProtocol) raises assert > assert self.numPorts > 0 > > I was hoping that this function will remove protocol instance from reactor. >
You can do: port = reactor.listenUDP(....) port.stopListening() # disconnect port _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python