Added .reconnect() method to drivers.

This commit is contained in:
Jeremy Fincher 2003-04-21 04:32:42 +00:00
parent e1e6b974d6
commit 06fe786029
3 changed files with 7 additions and 0 deletions

View File

@ -121,6 +121,8 @@ class AsyncoreDriver(asynchat.async_chat, object):
self.scheduleReconnect()
self.die()
reconnect = handle_close
def handle_connect(self):
pass

View File

@ -65,6 +65,9 @@ class IrcDriver(object):
# sure this (and anything else later added) is done.
_deadDrivers.append(self.name())
def reconnect(self):
raise NotImplementedError
def name(self):
return self.__class__.__name__

View File

@ -85,6 +85,8 @@ class SupyIrcProtocol(LineReceiver):
def die(self):
self.transport.loseConnection()
reconnect = die
class SupyReconnectingFactory(ReconnectingClientFactory):