MAXMESSAGESIZE = 1400
SWITCHBOARDTIMEOUT = 30.0*60.0
GETALLAVATARS = False
+ BINDADDRESS = "0.0.0.0"
def __init__(self, username, password, ident):
""" Connects to the MSN servers.
d = Deferred()
dispatchFactory.d = d
d.addCallbacks(self._gotNotificationReferral, self.connectionFailed)
- self.connectors.append(reactor.connectTCP("messenger.hotmail.com", 1863, dispatchFactory))
+ self.connectors.append(reactor.connectTCP("messenger.hotmail.com", 1863, dispatchFactory, bindAddress=(MSNConnection.BINDADDRESS, 0)))
LogEvent(INFO, self.ident)
def _gotNotificationReferral(self, (host, port)):
self.notificationFactory.password = self.password
self.notificationFactory.msncon = self
self.notificationFactory.protocol = NotificationClient
- self.connectors.append(reactor.connectTCP(host, port, self.notificationFactory))
+ self.connectors.append(reactor.connectTCP(host, port, self.notificationFactory, bindAddress=(MSNConnection.BINDADDRESS, 0)))
LogEvent(INFO, self.ident)
def _sendSavedEvents(self):
self.reply = 0
factory = ClientFactory()
factory.buildProtocol = lambda addr: self
- self.msncon.connectors.append(reactor.connectTCP(host, port, factory))
+ self.msncon.connectors.append(reactor.connectTCP(host, port, factory, bindAddress=(MSNConnection.BINDADDRESS, 0)))
def sbRequestFailed(ignored=None):
LogEvent(INFO, self.ident)
del self.msncon.switchboardSessions[self.remoteUser]
self.reply = 1
factory = ClientFactory()
factory.buildProtocol = lambda addr: self
- self.msncon.connectors.append(reactor.connectTCP(host, port, factory))
+ self.msncon.connectors.append(reactor.connectTCP(host, port, factory, bindAddress=(MSNConnection.BINDADDRESS, 0)))
def flushBuffer(self):
for message, noerror in self.messageBuffer[:]: