From 969c4652a4f4b5ad3a095bc746f42472abe3171c Mon Sep 17 00:00:00 2001 From: Tom Nichols Date: Fri, 9 Jul 2010 16:15:18 -0400 Subject: wait, shouldn't 'port' default to 5222?? Would seem logical to me. --- sleekxmpp/xmlstream/xmlstream.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 5c24de5b..3b3163c7 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -52,7 +52,7 @@ DEFAULT_KEEPALIVE = 300 # send a single byte every 5 minutes class XMLStream(object): "A connection manager with XML events." - def __init__(self, socket=None, host='', port=0, escape_quotes=False): + def __init__(self, socket=None, host='', port=5222, escape_quotes=False): global ssl_support self.ssl_support = ssl_support self.escape_quotes = escape_quotes @@ -101,7 +101,7 @@ class XMLStream(object): def setFileSocket(self, filesocket): self.filesocket = filesocket - def connect(self, host='', port=0, use_ssl=None): + def connect(self, host='', port=5222, use_ssl=None): "Establish a socket connection to the given XMPP server." if not self.state.transition('disconnected','connected', @@ -117,7 +117,7 @@ class XMLStream(object): # TODO currently a caller can't distinguish between "connection failed" and # "we're already trying to connect from another thread" - def connectTCP(self, host='', port=0, use_ssl=None, reattempt=True): + def connectTCP(self, host='', port=5222, use_ssl=None, reattempt=True): "Connect and create socket" # Note that this is thread-safe by merit of being called solely from connect() which -- cgit v1.2.3