def send_message(self, m): try: logging.debug('Sending %s', m.to_xml()) XmlStream.send(self, m.to_xml()) except Exception, err: logging.exception('Sending failed: %s', err)
def send_message(self, m): # logging.debug('Sending %s', m.to_xml()) XmlStream.send(self, m.to_xml())
def connectionMade(self): #logging.debug('connectionMade') XmlStream.connectionMade(self) #Send start stream XmlStream.send(self, '<?xml version="1.0" encoding="utf-8"?><root>')
def onDocumentStart(self, rootElement): XmlStream.onDocumentStart(self, rootElement) XmlStream.send(self, '<?xml version="1.0" encoding="utf-8"?><root>') # logging.debug('Document start received') manager.client_connected(self)