def __init__(self, socket): TimeOut.__init__(self) self.to_send = None self.socket = socket # create a PriorityQueue for packets self.queue = PriorityQueue()
def __init__(self, socket): TimeOut.__init__(self) self.socket = socket # create a PriorityQueue for each rate class self.queues = [ PriorityQueue() for __ in xrange(len(socket.rate_classes)) ]
def __init__(self, socket): TimeOut.__init__(self) self.socket = socket # create a PriorityQueue for each rate class self.queues = [PriorityQueue() for __ in xrange(len(socket.rate_classes))]
def __init__(self, seconds, func, *a, **k): self.seconds = seconds self.func = func self.a = a self.k = k TimeOut.__init__(self)
def start(self): self.done_at = default_timer() + self.seconds TimeOut.start(self)