def sendChallengeReply(self, challenge): """ Send reply to challenge. """ digest = self.generateDigest(challenge, self.factory.handler.cookie) self.challenge = self.generateChallenge() msg = "r" + thePacker.packInt(self.challenge) + digest self.send(msg)
def send_connected(self, data): """ Send during the connected state. """ msg = thePacker.packInt(len(data)) + data self.transport.write(msg)