Exemple #1
0
    def experiment(self, args):
        log.msg("Running experiment")
        if self.receive:
            d = txsr(self.build_packets(), pcapfile=self.pcapfile)
        else:
            d = txsend(self.build_packets())
        def finished(data):
            return data

        d.addCallback(finished)
        return d
Exemple #2
0
    def experiment(self, args):
        log.msg("Running experiment")
        if self.receive:
            log.msg("Sending and receiving packets.")
            d = txsr(self.build_packets(), pcapfile=self.pcapfile,
                    timeout=self.timeout)
        else:
            log.msg("Sending packets.")
            d = txsend(self.build_packets())

        def finished(data):
            log.msg("Finished sending")
            return data

        d.addCallback(finished)
        return d
Exemple #3
0
 def sendReceivePackets(self, *kw):
     d = txsr(packets=self.request, pcapfile=self.pcapfile,
              timeout=self.timeout, reactor=self.reactor)
     return d