def connectionLost(self, reason): NNTPClient.connectionLost(self) # calls self.factory.clientConnectionLost(self, reason) self.activeGroups = [] self.factory.clients.remove(self) self.isLoggedIn = False self.setReaderAfterLogin = False
def connectionLost(self, reason): NNTPClient.connectionLost( self) # calls self.factory.clientConnectionLost(self, reason) self.activeGroups = [] self.factory.clients.remove(self) self.isLoggedIn = False self.setReaderAfterLogin = False
def connectionMade(self): NNTPClient.connectionMade(self) # 'mode reader' is sometimes necessary to enable 'reader' mode. # However, the order in which 'mode reader' and 'authinfo' need to # arrive differs between some NNTP servers. Try to send # 'mode reader', and if it fails with an authorization failed # error, try again after sending authinfo. self.setReader()
def __init__(self, username, password): """ """ NNTPClient.__init__(self) self.username = username self.password = password self.id = self.getNextId() # successful GROUP commands during this session self.activeGroups = [] self.activatedGroups = False # current article (<segment>) we're dealing with self.currentSegment = None self.isLoggedIn = False self.setReaderAfterLogin = False # I'm not sure why this needs to be raised from the default value -- but we can # definitely get longer lines than LineReceiver expects self.MAX_LENGTH = 262144 self.CRUFT = """
def fetchBody(self, index): """ """ #reactor.callLater(0, NNTPClient.fetchBody, self, '<' + index + '>') NNTPClient.fetchBody(self, '<' + index + '>')