def shutdownCB(shutdown, status): try: ruv.free(shutdown) # print "Shut down server, status", status except: if not we_are_translated(): raise
def gaiCB(gai, status, ai): status = intmask(status) vat, resolver = ruv.unstashGAI(gai) with scopedVat(vat): assert isinstance(resolver, LocalResolver), "implementation error" if status < 0: msg = ruv.formatError(status).decode("utf-8") resolver.smash(StrObject(u"libuv error: %s" % msg)) else: gaiList = walkAI(ai) resolver.resolve(ConstList(gaiList[:])) ruv.freeAddrInfo(ai) ruv.free(gai)
def disarm(self): unstashSignal(self._signal) SignalStop(self._signal) free(self._signal)