Beispiel #1
0
def shutdownCB(shutdown, status):
    try:
        ruv.free(shutdown)
        # print "Shut down server, status", status
    except:
        if not we_are_translated():
            raise
Beispiel #2
0
def shutdownCB(shutdown, status):
    try:
        ruv.free(shutdown)
        # print "Shut down server, status", status
    except:
        if not we_are_translated():
            raise
Beispiel #3
0
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)
Beispiel #4
0
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)
Beispiel #5
0
 def disarm(self):
     unstashSignal(self._signal)
     SignalStop(self._signal)
     free(self._signal)