send now has a priority and an 'init' parameter to denote stanzas that may be sent prior to session establishment.

This commit is contained in:
Tom Nichols
2010-07-06 14:16:46 -04:00
parent 0a30e6c017
commit 259dffeb6e
5 changed files with 35 additions and 30 deletions

View File

@@ -383,7 +383,7 @@ class StanzaBase(ElementBase):
def exception(self, e):
logging.error(traceback.format_tb(e))
def send(self, priority=False):
if priority: self.stream.sendPriorityRaw(self.__str__())
else: self.stream.sendRaw(self.__str__())
def send(self, priority=5, init=False):
self.stream.sendRaw(self.__str__(), priority, init)