def __init__(self, nodemgr):
     import anydbm, os
     threading.Thread.__init__(self)
     self.waitlock = threading.Lock()
     self.waitcv = threading.Condition(self.waitlock)
     self.nodemgr = nodemgr
     self.lfactory = lease.leasefactory(nodemgr.conf.key)
     self.leasedb = anydbm.open(nodemgr.conf.leasedb, "c", 0644)
     self.sliverdb = anydbm.open(nodemgr.conf.sliverdb, "c", 0644)
     self.events = {}
     self.eventqueue = event.eventqueue(0)
示例#2
0
 def __init__(self, nodemgr):
     import anydbm, os
     threading.Thread.__init__(self)
     self.waitlock = threading.Lock()
     self.waitcv = threading.Condition(self.waitlock)
     self.nodemgr = nodemgr
     self.lfactory = lease.leasefactory(nodemgr.conf.key)
     self.leasedb = anydbm.open(nodemgr.conf.leasedb, "c", 0644)
     self.sliverdb = anydbm.open(nodemgr.conf.sliverdb, "c", 0644)
     self.events = {}
     self.eventqueue = event.eventqueue(0)
 def __init__(self, conf, nodemgr):
     from sslctx import svrctxinit
     import hacks, lease
     self.conf = conf
     self.dbthr = nodemgr.dbthr
     self.ip = nodemgr.ip
     self.nodemgr = nodemgr
     self.timesyncslack = 60 * 5
     self.lfactory = lease.leasefactory(conf.key)
     ctx = svrctxinit(conf.cert, conf.key, conf.cacert, "nodemgrsslsvr")
     SSL.ThreadingSSLServer.allow_reuse_address = 1
     try:
         method = SSL.ThreadingSSLServer.__init__
         args = [ self, ("", conf.xmlsslport), nodemgrsslhandler, ctx ]
         hacks.retryapply(method, args, 10, 1)
     except:
         raise "Could not bind to TCP port %d" % conf.xmlsslport
示例#4
0
 def __init__(self, conf, nodemgr):
     from sslctx import svrctxinit
     import hacks, lease
     self.conf = conf
     self.dbthr = nodemgr.dbthr
     self.ip = nodemgr.ip
     self.nodemgr = nodemgr
     self.timesyncslack = 60 * 5
     self.lfactory = lease.leasefactory(conf.key)
     ctx = svrctxinit(conf.cert, conf.key, conf.cacert, "nodemgrsslsvr")
     SSL.ThreadingSSLServer.allow_reuse_address = 1
     try:
         method = SSL.ThreadingSSLServer.__init__
         args = [self, ("", conf.xmlsslport), nodemgrsslhandler, ctx]
         hacks.retryapply(method, args, 10, 1)
     except:
         raise "Could not bind to TCP port %d" % conf.xmlsslport