def __init__(self, router, cachesize):
        self.router = router
        self.cache = cache_lru(cachesize)
        self.logfh = None
        self.nbbf = {}                   # A dict stores all the neighbours' bloomfiltes
        self.error_rate = 0.01           # The error rate of bloom filter

        t = threading.Thread(target=self.update, args= ())
        t.daemon = True
        t.start()
        pass
示例#2
0
 def __init__(self, router, cachesize):
     self.router = router             # Cache's corresponding router
     self.cache = cache_lru(cachesize)
     self.logfh = None
     pass
示例#3
0
 def __init__(self, router, cachesize):
     self.router = router
     self.cache = cache_lru(cachesize)
     self.logfh = None
     pass